pidgin: 2d10538e: Attempt to avoid a crash in MSN. See th...

markdoliner at pidgin.im markdoliner at pidgin.im
Thu Nov 13 16:00:33 EST 2008


-----------------------------------------------------------------
Revision: 2d10538e47e4d45e8c292b021893ed045ce266f0
Ancestor: df1ae446de2d28a2fd1c62bbcd6c2cba03a11732
Author: markdoliner at pidgin.im
Date: 2008-11-13T20:59:40
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/2d10538e47e4d45e8c292b021893ed045ce266f0

Modified files:
        libpurple/protocols/msn/slp.c

ChangeLog: 

Attempt to avoid a crash in MSN.  See the comment in the code.
Our MSN custom emoticon code is crashy, by the way.  Basically I
think the slp/slplink/slpcall/switchboard code is buggy.  I think
there are a lot of cross-references and they don't all clean up
after themselves correctly.  But I don't understand this code
well enough to improve it.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/slp.c	655e7fb5c5804adc6c46050abce82988489c0f5b
+++ libpurple/protocols/msn/slp.c	18d0dbc09dc3b63c5ecbd6a534d621b24663c527
@@ -847,7 +847,17 @@ msn_emoticon_msg(MsnCmdProc *cmdproc, Ms
 		sha1 = msn_object_get_sha1(obj);
 
 		slplink = msn_session_get_slplink(session, who);
-		slplink->swboard = swboard;
+		if (slplink->swboard != swboard) {
+			if (slplink->swboard != NULL)
+				/*
+				 * Apparently we're using a different switchboard now or
+				 * something?  I don't know if this is normal, but it
+				 * definitely happens.  So make sure the old switchboard
+				 * doesn't still have a reference to us.
+				 */
+				slplink->swboard->slplinks = g_list_remove(slplink->swboard->slplinks, slplink);
+			slplink->swboard = swboard;
+		}
 
 		/* If the conversation doesn't exist then this is a custom smiley
 		 * used in the first message in a MSN conversation: we need to create


More information about the Commits mailing list