diff libpurple/protocols/msn/switchboard.c @ 24395:9b253ce969d0

msn_slplink_remove_slpcall() shouldn't be responsible for setting slpcall->slplink to NULL. In fact, msn_slp_call_destroy() shouldn't even call msn_slplink_remove_slpcall() until it knows that it doesn't need the slplink anymore. So move the call to msn_slplink_remove_slpcall() further down in that function. Now we no longer need the return value from msn_switchboard_release(). That return value, by the way, was dumb. If you're no longer using the MsnSwitchBoard then you're not using it and you shouldn't care if it was destroyed or not.
author Mark Doliner <mark@kingant.net>
date Thu, 13 Nov 2008 07:22:39 +0000
parents fb722b8b4c74
children 3f80f211417e d855ff9cf839
line wrap: on
line diff
--- a/libpurple/protocols/msn/switchboard.c	Thu Nov 13 06:57:20 2008 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Thu Nov 13 07:22:39 2008 +0000
@@ -1315,10 +1315,10 @@
 	}
 }
 
-gboolean
+void
 msn_switchboard_release(MsnSwitchBoard *swboard, MsnSBFlag flag)
 {
-	g_return_val_if_fail(swboard != NULL, FALSE);
+	g_return_if_fail(swboard != NULL);
 
 	swboard->flag &= ~flag;
 
@@ -1328,12 +1328,8 @@
 		swboard->conv = NULL;
 
 	if (swboard->flag == 0)
-	{
+		/* Nothing else is using this switchboard, so close it */
 		msn_switchboard_close(swboard);
-		return TRUE;
-	}
-
-	return FALSE;
 }
 
 /**************************************************************************