# HG changeset patch # User Ka-Hing Cheung # Date 1218691512 0 # Node ID a556012a56b97b22c208de03ddd4f3c5ff3024f5 # Parent 91169093449d835bf4c8fee8e32d8eed603faaac 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 91169093449d -r a556012a56b9 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 91169093449d -r a556012a56b9 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