pidgin: 01cab96a: patch from Maiku to ignore non-messenger...

khc at pidgin.im khc at pidgin.im
Sat Mar 29 12:05:44 EDT 2008


-----------------------------------------------------------------
Revision: 01cab96afbc36f21d5b67cb5791b1cf6a0b48920
Ancestor: 8694cdf8884d0e71329ba9e829123eb4e3fc5fa7
Author: khc at pidgin.im
Date: 2008-03-29T16:03:16
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/01cab96afbc36f21d5b67cb5791b1cf6a0b48920

Modified files:
        libpurple/protocols/msn/contact.c

ChangeLog: 

patch from Maiku to ignore non-messenger contacts, fixes #3305

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/contact.c	43f70cc48eab5838f5813a6a673c6b1b613c25e7
+++ libpurple/protocols/msn/contact.c	6d2b4780389020bb6bbfefa3b55ad0fefa2e0f3a
@@ -525,7 +525,7 @@ msn_parse_addressbook_contacts(MsnContac
 
 	for(contactNode = xmlnode_get_child(node, "Contact"); contactNode;
 				contactNode = xmlnode_get_next_twin(contactNode)) {
-		xmlnode *contactId, *contactInfo, *contactType, *passportName, *displayName, *guid, *groupIds;
+		xmlnode *contactId, *contactInfo, *contactType, *passportName, *displayName, *guid, *groupIds, *messenger_user;
 		MsnUser *user;
 		MsnUserType usertype;
 
@@ -554,6 +554,18 @@ msn_parse_addressbook_contacts(MsnContac
 			continue; /* Not adding own account as buddy to buddylist */
 		}
 
+		/* ignore non-messenger contacts */
+		if((messenger_user = xmlnode_get_child(contactInfo, "isMessengerUser"))) {
+			char *is_messenger_user = xmlnode_get_data(messenger_user);
+
+			if(is_messenger_user && !strcmp(is_messenger_user, "false")) {
+				g_free(is_messenger_user);
+				continue;
+			}
+
+			g_free(is_messenger_user);
+		}
+
 		usertype = msn_get_user_type(type);
 		passportName = xmlnode_get_child(contactInfo, "passportName");
 		if (passportName == NULL) {


More information about the Commits mailing list