changeset 23718:a556012a56b9

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
author Ka-Hing Cheung <khc@hxbc.us>
date Thu, 14 Aug 2008 05:25:12 +0000
parents 91169093449d
children 55f3660f60d2
files libpurple/protocols/msn/slplink.c libpurple/protocols/msn/switchboard.c
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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
--- 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