switchboards really can be referenced by multiple slplinks, I have no idea cpw.khc.msnp14

Sun, 20 May 2007 16:30:39 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Sun, 20 May 2007 16:30:39 +0000
branch
cpw.khc.msnp14
changeset 20503
803dee40191e
parent 20502
ac12225eaf18
child 20504
836e5a6ee591
child 20505
e011c439730b

switchboards really can be referenced by multiple slplinks, I have no idea
why this GList was replaced with a single slplink in msnp14 but it's
possible that it was causing some problems.
References #1142

libpurple/protocols/msn/slp.c file | annotate | diff | comparison | revisions
libpurple/protocols/msn/slplink.c file | annotate | diff | comparison | revisions
libpurple/protocols/msn/switchboard.c file | annotate | diff | comparison | revisions
libpurple/protocols/msn/switchboard.h file | annotate | diff | comparison | revisions
--- a/libpurple/protocols/msn/slp.c	Sun May 20 15:59:10 2007 +0000
+++ b/libpurple/protocols/msn/slp.c	Sun May 20 16:30:39 2007 +0000
@@ -756,7 +756,7 @@
 		 * reporting bugs. Hopefully this doesn't cause more crashes. Stu.
 		 */
 		if (slplink->swboard != NULL)
-			slplink->swboard->slplink = slplink;
+			slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
 		else
 			purple_debug_error("msn", "msn_p2p_msg, swboard is NULL, ouch!\n");
 	}
--- a/libpurple/protocols/msn/slplink.c	Sun May 20 15:59:10 2007 +0000
+++ b/libpurple/protocols/msn/slplink.c	Sun May 20 16:30:39 2007 +0000
@@ -102,7 +102,7 @@
 	g_return_if_fail(slplink != NULL);
 
 	if (slplink->swboard != NULL)
-		slplink->swboard->slplink = NULL;
+		slplink->swboard->slplinks = g_list_remove(slplink->swboard->slplinks, slplink);
 
 	session = slplink->session;
 
@@ -259,7 +259,7 @@
 				return;
 
 			/* If swboard is destroyed we will be too */
-			slplink->swboard->slplink = slplink;
+			slplink->swboard->slplinks = g_list_prepend(slplink->swboard->slplinks, slplink);
 		}
 
 		msn_switchboard_send_msg(slplink->swboard, msg, TRUE);
--- a/libpurple/protocols/msn/switchboard.c	Sun May 20 15:59:10 2007 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Sun May 20 16:30:39 2007 +0000
@@ -84,8 +84,8 @@
 	swboard->destroying = TRUE;
 
 	/* If it linked us is because its looking for trouble */
-	if (swboard->slplink != NULL)
-		msn_slplink_destroy(swboard->slplink);
+	while (swboard->slplinks != NULL)
+		msn_slplink_destroy(swboard->slplinks->data);
 
 	/* Destroy the message queue */
 	while ((msg = g_queue_pop_head(swboard->msg_queue)) != NULL)
--- a/libpurple/protocols/msn/switchboard.h	Sun May 20 15:59:10 2007 +0000
+++ b/libpurple/protocols/msn/switchboard.h	Sun May 20 16:30:39 2007 +0000
@@ -102,7 +102,7 @@
 
 	MsnSBErrorType error; /**< The error that occurred in this switchboard
 							(if applicable). */
-	MsnSlpLink *slplink; /**< The slplink that is using this switchboard. */
+	GList *slplinks; /**< The list of slplinks that are using this switchboard. */
 };
 
 /**

mercurial