changeset 30830:e935d15725c3

Hide msn_slplink_destroy and use the unref version everywhere.
author masca@cpw.pidgin.im
date Thu, 24 Jun 2010 00:12:45 +0000
parents 85f66a8f2633
children 210feb895031
files libpurple/protocols/msn/directconn.c libpurple/protocols/msn/session.c libpurple/protocols/msn/slplink.c libpurple/protocols/msn/slplink.h libpurple/protocols/msn/switchboard.c
diffstat 5 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/directconn.c	Wed Jun 23 23:35:13 2010 +0000
+++ b/libpurple/protocols/msn/directconn.c	Thu Jun 24 00:12:45 2010 +0000
@@ -185,7 +185,7 @@
 	if (slplink) {
 		slplink->dc = NULL;
 		if (slplink->swboard == NULL)
-			msn_slplink_destroy(slplink);
+			msn_slplink_unref(slplink);
 	}
 
 	g_free(dc->msg_body);
--- a/libpurple/protocols/msn/session.c	Wed Jun 23 23:35:13 2010 +0000
+++ b/libpurple/protocols/msn/session.c	Thu Jun 24 00:12:45 2010 +0000
@@ -72,7 +72,7 @@
 		g_hash_table_destroy(session->soap_table);
 
 	while (session->slplinks != NULL)
-		msn_slplink_destroy(session->slplinks->data);
+		msn_slplink_unref(session->slplinks->data);
 
 	while (session->switches != NULL)
 		msn_switchboard_destroy(session->switches->data);
--- a/libpurple/protocols/msn/slplink.c	Wed Jun 23 23:35:13 2010 +0000
+++ b/libpurple/protocols/msn/slplink.c	Thu Jun 24 00:12:45 2010 +0000
@@ -88,7 +88,7 @@
 	return msn_slplink_ref(slplink);
 }
 
-void
+static void
 msn_slplink_destroy(MsnSlpLink *slplink)
 {
 	MsnSession *session;
--- a/libpurple/protocols/msn/slplink.h	Wed Jun 23 23:35:13 2010 +0000
+++ b/libpurple/protocols/msn/slplink.h	Thu Jun 24 00:12:45 2010 +0000
@@ -57,8 +57,6 @@
 MsnSlpLink *msn_slplink_ref(MsnSlpLink *slplink);
 void msn_slplink_unref(MsnSlpLink *slplink);
 
-void msn_slplink_destroy(MsnSlpLink *slplink);
-
 /**
  * @return An MsnSlpLink for the given user, or NULL if there is no
  *         existing MsnSlpLink.
--- a/libpurple/protocols/msn/switchboard.c	Wed Jun 23 23:35:13 2010 +0000
+++ b/libpurple/protocols/msn/switchboard.c	Thu Jun 24 00:12:45 2010 +0000
@@ -90,9 +90,11 @@
 	while (swboard->slplinks != NULL) {
 		MsnSlpLink *slplink = swboard->slplinks->data;
 
+		swboard->slplinks = g_list_remove(swboard->slplinks, slplink);
+
 		/* Destroy only those slplinks which use the switchboard */
 		if (slplink->dc == NULL)
-			msn_slplink_destroy(slplink);
+			msn_slplink_unref(slplink);
 		else {
 			swboard->slplinks = g_list_remove(swboard->slplinks, slplink);
 			slplink->swboard = NULL;