# HG changeset patch # User Mark Doliner # Date 1057390569 0 # Node ID 38999b6b1838fc4a59708803171918bd3b21d360 # Parent 98407c5019e91c74622326921097de48163e5659 [gaim-migrate @ 6479] This fixes many random problems with oscar not being able to sign on or getting kicked offline. committer: Tailor Script diff -r 98407c5019e9 -r 38999b6b1838 src/connection.c --- a/src/connection.c Sat Jul 05 07:33:48 2003 +0000 +++ b/src/connection.c Sat Jul 05 07:36:09 2003 +0000 @@ -172,6 +172,16 @@ gaim_connection_destroy(gc); } +gboolean +gaim_connection_disconnect_cb(gpointer data) +{ + GaimConnection *gc = data; + + gaim_connection_disconnect(gc); + + return FALSE; +} + /* * d:)->-< * @@ -361,7 +371,7 @@ if (ops != NULL && ops->disconnected != NULL) ops->disconnected(gc, text); - gaim_connection_disconnect(gc); + g_timeout_add(0, gaim_connection_disconnect_cb, gc); } void diff -r 98407c5019e9 -r 38999b6b1838 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sat Jul 05 07:33:48 2003 +0000 +++ b/src/protocols/oscar/oscar.c Sat Jul 05 07:36:09 2003 +0000 @@ -516,8 +516,10 @@ } else { if (aim_get_command(od->sess, conn) >= 0) { aim_rxdispatch(od->sess); - if (od->killme) - gaim_connection_destroy(gc); + if (od->killme) { + gaim_debug(GAIM_DEBUG_ERROR, "oscar", "Waiting to be destroyed\n"); + return; + } } else { if ((conn->type == AIM_CONN_TYPE_BOS) || !(aim_getconn_type(od->sess, AIM_CONN_TYPE_BOS))) { @@ -1028,16 +1030,15 @@ } static int gaim_parse_auth_resp(aim_session_t *sess, aim_frame_t *fr, ...) { + GaimConnection *gc = sess->aux_data; + struct oscar_data *od = gc->proto_data; + GaimAccount *account = gc->account; + aim_conn_t *bosconn; + char *host; int port; + int i, rc; va_list ap; struct aim_authresp_info *info; - int i, rc; - char *host; int port; - GaimAccount *account; - aim_conn_t *bosconn; - - GaimConnection *gc = sess->aux_data; - struct oscar_data *od = gc->proto_data; - account = gc->account; + port = gaim_account_get_int(account, "port", FAIM_LOGIN_PORT); va_start(ap, fr);