Mercurial > pidgin
comparison src/protocols/jabber/jabber.c @ 7427:30bbf20b4ef1
[gaim-migrate @ 8030]
more error stuffs
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Tue, 04 Nov 2003 22:05:30 +0000 |
parents | d3711f98f568 |
children | 43a214a385d1 |
comparison
equal
deleted
inserted
replaced
7426:d3711f98f568 | 7427:30bbf20b4ef1 |
---|---|
343 | 343 |
344 jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING); | 344 jabber_stream_set_state(js, JABBER_STREAM_INITIALIZING); |
345 gc->inpa = gaim_input_add(js->fd, GAIM_INPUT_READ, jabber_recv_cb, gc); | 345 gc->inpa = gaim_input_add(js->fd, GAIM_INPUT_READ, jabber_recv_cb, gc); |
346 } | 346 } |
347 | 347 |
348 static void tls_init(JabberStream *js) | |
349 { | |
350 gaim_input_remove(js->gc->inpa); | |
351 js->gc->inpa = 0; | |
352 js->gsc = gaim_ssl_connect_fd(js->gc->account, js->fd, | |
353 jabber_login_callback_ssl, NULL, js->gc); | |
354 } | |
355 | |
356 static void | 348 static void |
357 jabber_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, | 349 jabber_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, |
358 gpointer data) | 350 gpointer data) |
359 { | 351 { |
360 GaimConnection *gc = data; | 352 GaimConnection *gc = data; |
363 case GAIM_SSL_HANDSHAKE_FAILED: | 355 case GAIM_SSL_HANDSHAKE_FAILED: |
364 gaim_connection_error(gc, _("SSL Handshake Failed")); | 356 gaim_connection_error(gc, _("SSL Handshake Failed")); |
365 break; | 357 break; |
366 } | 358 } |
367 } | 359 } |
360 | |
361 static void tls_init(JabberStream *js) | |
362 { | |
363 gaim_input_remove(js->gc->inpa); | |
364 js->gc->inpa = 0; | |
365 js->gsc = gaim_ssl_connect_fd(js->gc->account, js->fd, | |
366 jabber_login_callback_ssl, jabber_ssl_connect_failure, js->gc); | |
367 } | |
368 | |
368 | 369 |
369 static void | 370 static void |
370 jabber_login(GaimAccount *account) | 371 jabber_login(GaimAccount *account) |
371 { | 372 { |
372 int rc; | 373 int rc; |