changeset 20504:d23c3a5884ee

Make the buddylist sync issue a little less worse.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 14 Sep 2007 04:32:30 +0000
parents 7e7add38a02f
children 909af554e239
files libpurple/protocols/msn/notification.c libpurple/protocols/msn/session.c
diffstat 2 files changed, 4 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Sun Sep 09 00:45:05 2007 +0000
+++ b/libpurple/protocols/msn/notification.c	Fri Sep 14 04:32:30 2007 +0000
@@ -1987,6 +1987,7 @@
 	
 	msn_notification_post_adl(notification->servconn->cmdproc,
 						payload,payload_len);
+	g_free(payload);
 }
 
 void
@@ -2014,6 +2015,7 @@
 	trans = msn_transaction_new(cmdproc, "RML","%d", strlen(payload));
 	msn_transaction_set_payload(trans, payload, strlen(payload));
 	msn_cmdproc_send_trans(cmdproc, trans);
+	g_free(payload);
 }
 
 /**************************************************************************
--- a/libpurple/protocols/msn/session.c	Sun Sep 09 00:45:05 2007 +0000
+++ b/libpurple/protocols/msn/session.c	Fri Sep 14 04:32:30 2007 +0000
@@ -277,10 +277,6 @@
 		if(!PURPLE_BLIST_NODE_IS_GROUP(gnode))
 			continue;
 		group_name = group->name;
-//		if(!g_strcasecmp(group_name, MSN_INDIVIDUALS_GROUP_NAME)
-//						||	!g_strcasecmp(group_name,MSN_NON_IM_GROUP_NAME)){
-//			continue;
-//		}
 		for(cnode = gnode->child; cnode; cnode = cnode->next) {
 			if(!PURPLE_BLIST_NODE_IS_CONTACT(cnode))
 				continue;
@@ -297,21 +293,12 @@
 
 					if ((remote_user != NULL) && (remote_user->list_op & MSN_LIST_FL_OP))
 					{
-						const char *group_id;
 						GList *l;
 
-						purple_debug_info("MSNP14","remote user:{%s}\n",b->name);
-						group_id = msn_userlist_find_group_id(remote_user->userlist,
-								group_name);
-						if (group_id == NULL) {
-							continue;
-						}
-						purple_debug_info("MSNP14","group_id:{%s}\n",group_id);
-
 						for (l = remote_user->group_ids; l != NULL; l = l->next)
 						{
-							purple_debug_info("MSNP14","l->data:{%s}\n",l->data);
-							if (!g_strcasecmp(group_id ,l->data))
+							const char *name = msn_userlist_find_group_name(remote_user->userlist, l->data);
+							if (name && !g_strcasecmp(group_name, name))
 							{
 								found = TRUE;
 								break;