# HG changeset patch # User Christian Hammond # Date 1055707043 0 # Node ID 5baeb89ee2d44de0f6bbe791e811e4579f2aab90 # Parent e3733414ca08ee5f38f8bfe026665ca18a4a49c1 [gaim-migrate @ 6330] This should fix the XFR problem for good. committer: Tailor Script diff -r e3733414ca08 -r 5baeb89ee2d4 src/protocols/msn/servconn.c --- a/src/protocols/msn/servconn.c Sun Jun 15 19:23:59 2003 +0000 +++ b/src/protocols/msn/servconn.c Sun Jun 15 19:57:23 2003 +0000 @@ -61,12 +61,9 @@ size_t param_count = 0; char *command, *param_start; char **params = NULL; - MsnServConn *old_notification_conn; command = str; - old_notification_conn = session->notification_conn; - /** * See how many spaces we have in this. */ @@ -102,18 +99,8 @@ if (params != NULL) g_strfreev(params); - /* - * We're checking here if the old notification server was replaced - * with a new one, and if the current servconn here is the old - * notification server. If so, we're going to have a bit of trouble - * in the upcoming loop, as servconn will be a freed variable, so - * we'll just return early. - */ - if (servconn == old_notification_conn && - old_notification_conn != session->notification_conn) { - + if (g_list_find(session->servconns, servconn) == NULL) return result; - } /* Process all queued messages that are waiting on this command. */ for (l = servconn->msg_queue; l != NULL; l = l_next) { @@ -203,6 +190,8 @@ servconn->msg_types = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); + session->servconns = g_list_append(session->servconns, servconn); + return servconn; } @@ -256,8 +245,14 @@ void msn_servconn_destroy(MsnServConn *servconn) { + MsnSession *session; + g_return_if_fail(servconn != NULL); + session = servconn->session; + + session->servconns = g_list_remove(session->servconns, servconn); + if (servconn->connected) msn_servconn_disconnect(servconn); diff -r e3733414ca08 -r 5baeb89ee2d4 src/protocols/msn/session.h --- a/src/protocols/msn/session.h Sun Jun 15 19:23:59 2003 +0000 +++ b/src/protocols/msn/session.h Sun Jun 15 19:57:23 2003 +0000 @@ -47,6 +47,7 @@ MsnUsers *users; MsnGroups *groups; + GList *servconns; GList *switches; struct