Mercurial > pidgin
comparison libpurple/protocols/jabber/jabber.c @ 28943:1cf9103727f2
jabber: Remove a funky workaround for an (old) OpenSSL crash.
I don't think this is an issue anymore; since 122423d4 (mid-2009),
gc->disconnect_timeout is set to 0 before calling jabber_close, so these
checks never trigger on connection errors (they still do if someone
calls purple_connection_error_reason followed immediately by
purple_account_disconnect, but I don't think that was the issue here).
If this introduces regressions (presumably in Adium), it can be reverted,
but Adium betas have been running post-122423d4 versions for the last few.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 03 Feb 2010 05:33:33 +0000 |
parents | b65311c73adc |
children | 7cab6dc6b79c 422889fb57e0 a538cb73f897 |
comparison
equal
deleted
inserted
replaced
28942:b65311c73adc | 28943:1cf9103727f2 |
---|---|
1441 * termination before destorying everything. That seems like it would require | 1441 * termination before destorying everything. That seems like it would require |
1442 * changing the semantics of prpl->close(), so it's a good idea for 3.0.0. | 1442 * changing the semantics of prpl->close(), so it's a good idea for 3.0.0. |
1443 */ | 1443 */ |
1444 void jabber_close(PurpleConnection *gc) | 1444 void jabber_close(PurpleConnection *gc) |
1445 { | 1445 { |
1446 JabberStream *js = gc->proto_data; | 1446 JabberStream *js = purple_connection_get_protocol_data(gc); |
1447 | 1447 |
1448 /* Close all of the open Jingle sessions on this stream */ | 1448 /* Close all of the open Jingle sessions on this stream */ |
1449 jingle_terminate_sessions(js); | 1449 jingle_terminate_sessions(js); |
1450 | 1450 |
1451 /* Don't perform any actions on the ssl connection | 1451 if (js->bosh) |
1452 * if we were forcibly disconnected because it will crash | 1452 jabber_bosh_connection_close(js->bosh); |
1453 * on some SSL backends. | 1453 else if ((js->gsc && js->gsc->fd > 0) || js->fd > 0) |
1454 */ | 1454 jabber_send_raw(js, "</stream:stream>", -1); |
1455 if (!gc->disconnect_timeout) { | |
1456 if (js->bosh) | |
1457 jabber_bosh_connection_close(js->bosh); | |
1458 else if ((js->gsc && js->gsc->fd > 0) || js->fd > 0) | |
1459 jabber_send_raw(js, "</stream:stream>", -1); | |
1460 } | |
1461 | 1455 |
1462 if (js->srv_query_data) | 1456 if (js->srv_query_data) |
1463 purple_srv_cancel(js->srv_query_data); | 1457 purple_srv_cancel(js->srv_query_data); |
1464 | 1458 |
1465 if(js->gsc) { | 1459 if(js->gsc) { |
1466 #ifdef HAVE_OPENSSL | 1460 purple_ssl_close(js->gsc); |
1467 if (!gc->disconnect_timeout) | |
1468 #endif | |
1469 purple_ssl_close(js->gsc); | |
1470 } else if (js->fd > 0) { | 1461 } else if (js->fd > 0) { |
1471 if(js->gc->inpa) | 1462 if(js->gc->inpa) |
1472 purple_input_remove(js->gc->inpa); | 1463 purple_input_remove(js->gc->inpa); |
1473 close(js->fd); | 1464 close(js->fd); |
1474 } | 1465 } |