changeset 32529:28b741b2fc1d

Call aim_ssi_cleanlist from within the feedbag code. Just want to make this function call more required, because I want the liboscar buddy list code to be able to assume that the list is "clean"
author Mark Doliner <mark@kingant.net>
date Sun, 19 Feb 2012 01:27:00 +0000
parents 11c9664778d7
children 097aaeb155ee
files libpurple/protocols/oscar/family_feedbag.c libpurple/protocols/oscar/oscar.c libpurple/protocols/oscar/oscar.h
diffstat 3 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_feedbag.c	Sat Feb 18 23:46:04 2012 +0000
+++ b/libpurple/protocols/oscar/family_feedbag.c	Sun Feb 19 01:27:00 2012 +0000
@@ -769,7 +769,7 @@
  * @param od The oscar odion.
  * @return Return 0 if no errors, otherwise return the error number.
  */
-int aim_ssi_cleanlist(OscarData *od)
+static int aim_ssi_cleanlist(OscarData *od)
 {
 	struct aim_ssi_item *cur, *next;
 
@@ -1336,6 +1336,9 @@
 		for (cur=od->ssi.official.data; cur; cur=cur->next)
 			aim_ssi_itemlist_add(&od->ssi.local, cur->name, cur->gid, cur->bid, cur->type, cur->data);
 
+		/* Clean the buddy list */
+		aim_ssi_cleanlist(od);
+
 		od->ssi.received_data = TRUE;
 
 		if ((userfunc = aim_callhandler(od, snac->family, snac->subtype)))
--- a/libpurple/protocols/oscar/oscar.c	Sat Feb 18 23:46:04 2012 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Sun Feb 19 01:27:00 2012 +0000
@@ -3924,9 +3924,6 @@
 
 	purple_debug_info("oscar", "ssi: syncing local list and server list\n");
 
-	/* Clean the buddy list */
-	aim_ssi_cleanlist(od);
-
 	/*** Begin code for pruning buddies from local list if they're not in server list ***/
 
 	/* Buddies */
--- a/libpurple/protocols/oscar/oscar.h	Sat Feb 18 23:46:04 2012 +0000
+++ b/libpurple/protocols/oscar/oscar.h	Sun Feb 19 01:27:00 2012 +0000
@@ -940,7 +940,6 @@
 int aim_ssi_aliasbuddy(OscarData *od, const char *gn, const char *bn, const char *alias);
 int aim_ssi_editcomment(OscarData *od, const char *gn, const char *bn, const char *alias);
 int aim_ssi_rename_group(OscarData *od, const char *oldgn, const char *newgn);
-int aim_ssi_cleanlist(OscarData *od);
 int aim_ssi_deletelist(OscarData *od);
 int aim_ssi_setpermdeny(OscarData *od, guint8 permdeny);
 int aim_ssi_setpresence(OscarData *od, guint32 presence);