Mercurial > pidgin
comparison libpurple/protocols/jabber/jabber.c @ 25049:f775f6021654
* using libpurple's internal SASL mechanisms during BOSH authentication phase
author | Tobias Markmann <tfar@soc.pidgin.im> |
---|---|
date | Fri, 15 Aug 2008 14:02:21 +0000 |
parents | f9322be084c4 |
children | a03a953ba63d |
comparison
equal
deleted
inserted
replaced
25048:b175b16768ac | 25049:f775f6021654 |
---|---|
143 } | 143 } |
144 | 144 |
145 jabber_session_init(js); | 145 jabber_session_init(js); |
146 } | 146 } |
147 | 147 |
148 static void jabber_stream_features_parse(JabberStream *js, xmlnode *packet) | 148 void jabber_stream_features_parse(JabberStream *js, xmlnode *packet) |
149 { | 149 { |
150 if(xmlnode_get_child(packet, "starttls")) { | 150 if(xmlnode_get_child(packet, "starttls")) { |
151 if(jabber_process_starttls(js, packet)) | 151 if(jabber_process_starttls(js, packet)) |
152 return; | 152 return; |
153 } else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE) && !js->gsc) { | 153 } else if(purple_account_get_bool(js->gc->account, "require_tls", FALSE) && !js->gsc) { |
386 | 386 |
387 /* if we get NULL back, we're done processing */ | 387 /* if we get NULL back, we're done processing */ |
388 if(NULL == packet) | 388 if(NULL == packet) |
389 return; | 389 return; |
390 | 390 |
391 txt = xmlnode_to_str(packet, &len); | 391 if (js->use_bosh) { |
392 jabber_send_raw(js, txt, len); | 392 jabber_bosh_connection_send(&(js->bosh), packet); |
393 g_free(txt); | 393 } else { |
394 txt = xmlnode_to_str(packet, &len); | |
395 jabber_send_raw(js, txt, len); | |
396 g_free(txt); | |
397 } | |
394 } | 398 } |
395 | 399 |
396 static void jabber_pong_cb(JabberStream *js, xmlnode *packet, gpointer timeout) | 400 static void jabber_pong_cb(JabberStream *js, xmlnode *packet, gpointer timeout) |
397 { | 401 { |
398 purple_timeout_remove(GPOINTER_TO_INT(timeout)); | 402 purple_timeout_remove(GPOINTER_TO_INT(timeout)); |