| 352 js->gsc = gaim_ssl_connect_fd(js->gc->account, js->fd, |
352 js->gsc = gaim_ssl_connect_fd(js->gc->account, js->fd, |
| 353 jabber_login_callback_ssl, NULL, js->gc); |
353 jabber_login_callback_ssl, NULL, js->gc); |
| 354 } |
354 } |
| 355 |
355 |
| 356 static void |
356 static void |
| |
357 jabber_ssl_connect_failure(GaimSslConnection *gsc, GaimSslErrorType error, |
| |
358 gpointer data) |
| |
359 { |
| |
360 GaimConnection *gc = data; |
| |
361 |
| |
362 switch(error) { |
| |
363 case GAIM_SSL_HANDSHAKE_FAILED: |
| |
364 gaim_connection_error(gc, _("SSL Handshake Failed")); |
| |
365 break; |
| |
366 } |
| |
367 } |
| |
368 |
| |
369 static void |
| 357 jabber_login(GaimAccount *account) |
370 jabber_login(GaimAccount *account) |
| 358 { |
371 { |
| 359 int rc; |
372 int rc; |
| 360 GaimConnection *gc = gaim_account_get_connection(account); |
373 GaimConnection *gc = gaim_account_get_connection(account); |
| 361 const char *connect_server = gaim_account_get_string(account, |
374 const char *connect_server = gaim_account_get_string(account, |
| 399 |
412 |
| 400 if(gaim_account_get_bool(account, "old_ssl", FALSE) |
413 if(gaim_account_get_bool(account, "old_ssl", FALSE) |
| 401 && gaim_ssl_is_supported()) { |
414 && gaim_ssl_is_supported()) { |
| 402 js->gsc = gaim_ssl_connect(account, server, |
415 js->gsc = gaim_ssl_connect(account, server, |
| 403 gaim_account_get_int(account, "port", 5222), |
416 gaim_account_get_int(account, "port", 5222), |
| 404 jabber_login_callback_ssl, NULL, gc); |
417 jabber_login_callback_ssl, jabber_ssl_connect_failure, gc); |
| 405 } |
418 } |
| 406 |
419 |
| 407 if(!js->gsc) { |
420 if(!js->gsc) { |
| 408 rc = gaim_proxy_connect(account, server, |
421 rc = gaim_proxy_connect(account, server, |
| 409 gaim_account_get_int(account, "port", 5222), |
422 gaim_account_get_int(account, "port", 5222), |