# HG changeset patch # User Ka-Hing Cheung # Date 1218691512 0 # Node ID 88d38a33d0797a41ae112052112594b2eec33b94 # Parent 3fd74bed39684d5c3ec9d0ef42f93948d3f0680d This should fix a crash that I've been seeing. I am not sure if this is the same as #6441 or not, my backtrace is different, but I can always hope, right? Would appreciate if whoever's been seeing that test again. References #6441 diff -r 3fd74bed3968 -r 88d38a33d079 libpurple/protocols/msn/slplink.c --- a/libpurple/protocols/msn/slplink.c Tue Aug 12 23:35:02 2008 +0000 +++ b/libpurple/protocols/msn/slplink.c Thu Aug 14 05:25:12 2008 +0000 @@ -27,6 +27,8 @@ #include "switchboard.h" #include "slp.h" +#define MSN_DEBUG_SLPLINK + void msn_slplink_send_msgpart(MsnSlpLink *slplink, MsnSlpMessage *slpmsg); #ifdef MSN_DEBUG_SLP_FILES diff -r 3fd74bed3968 -r 88d38a33d079 libpurple/protocols/msn/switchboard.c --- a/libpurple/protocols/msn/switchboard.c Tue Aug 12 23:35:02 2008 +0000 +++ b/libpurple/protocols/msn/switchboard.c Thu Aug 14 05:25:12 2008 +0000 @@ -34,6 +34,8 @@ static void msg_error_helper(MsnCmdProc *cmdproc, MsnMessage *msg, MsnMsgErrorType error); +#define MSN_DEBUG_SB + /************************************************************************** * Main **************************************************************************/ @@ -114,6 +116,11 @@ session = swboard->session; session->switches = g_list_remove(session->switches, swboard); + for (l = session->slplinks; l; l = l->next) { + MsnSlpLink *slplink = l->data; + if (slplink->swboard == swboard) slplink->swboard = NULL; + } + #if 0 /* This should never happen or we are in trouble. */ if (swboard->servconn != NULL) @@ -540,7 +547,7 @@ payload = msn_message_gen_payload(msg, &payload_len); #ifdef MSN_DEBUG_SB - purple_debug_info("msn", "SB length:{%d}", payload_len); + purple_debug_info("msn", "SB length:{%" G_GSIZE_FORMAT "}", payload_len); msn_message_show_readable(msg, "SB SEND", FALSE); #endif