Mercurial > pidgin
comparison libgaim/protocols/jabber/jabber.c @ 14250:1f963d406bb4
[gaim-migrate @ 16932]
More sslconn improvements
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 21 Aug 2006 02:42:14 +0000 |
parents | 60b1bc8dbf37 |
children | baff095b146c |
comparison
equal
deleted
inserted
replaced
14249:9c371189d7d6 | 14250:1f963d406bb4 |
---|---|
405 GaimInputCondition cond) | 405 GaimInputCondition cond) |
406 { | 406 { |
407 GaimConnection *gc = data; | 407 GaimConnection *gc = data; |
408 JabberStream *js = gc->proto_data; | 408 JabberStream *js = gc->proto_data; |
409 | 409 |
410 if(!g_list_find(gaim_connections_get_all(), gc)) { | |
411 gaim_ssl_close(gsc); | |
412 return; | |
413 } | |
414 | |
415 js->gsc = gsc; | |
416 | |
417 if(js->state == JABBER_STREAM_CONNECTING) | 410 if(js->state == JABBER_STREAM_CONNECTING) |
418 jabber_send_raw(js, "<?xml version='1.0' ?>", -1); | 411 jabber_send_raw(js, "<?xml version='1.0' ?>", -1); |
419 jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING); | 412 jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING); |
420 gaim_ssl_input_add(gsc, jabber_recv_cb_ssl, gc); | 413 gaim_ssl_input_add(gsc, jabber_recv_cb_ssl, gc); |
421 } | 414 } |
447 jabber_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, | 440 jabber_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, |
448 gpointer data) | 441 gpointer data) |
449 { | 442 { |
450 GaimConnection *gc = data; | 443 GaimConnection *gc = data; |
451 JabberStream *js = gc->proto_data; | 444 JabberStream *js = gc->proto_data; |
445 | |
446 js->gsc = NULL; | |
452 | 447 |
453 switch(error) { | 448 switch(error) { |
454 case GAIM_SSL_CONNECT_FAILED: | 449 case GAIM_SSL_CONNECT_FAILED: |
455 gaim_connection_error(gc, _("Connection Failed")); | 450 gaim_connection_error(gc, _("Connection Failed")); |
456 break; | 451 break; |
457 case GAIM_SSL_HANDSHAKE_FAILED: | 452 case GAIM_SSL_HANDSHAKE_FAILED: |
458 gaim_connection_error(gc, _("SSL Handshake Failed")); | 453 gaim_connection_error(gc, _("SSL Handshake Failed")); |
459 break; | 454 break; |
460 } | 455 } |
461 | |
462 js->gsc = NULL; | |
463 } | 456 } |
464 | 457 |
465 static void tls_init(JabberStream *js) | 458 static void tls_init(JabberStream *js) |
466 { | 459 { |
467 gaim_input_remove(js->gc->inpa); | 460 gaim_input_remove(js->gc->inpa); |