changeset 30660:4cdea258b143

Save extended capabilities of an MSN buddy when receiving NLN.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 09 Dec 2009 21:09:14 +0000
parents 88c48bcb5455
children ccb05979ab8a
files libpurple/protocols/msn/notification.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Wed Dec 09 21:08:24 2009 +0000
+++ b/libpurple/protocols/msn/notification.c	Wed Dec 09 21:09:14 2009 +0000
@@ -1291,7 +1291,8 @@
 	PurpleConnection *gc;
 	MsnUser *user;
 	MsnObject *msnobj;
-	unsigned long clientid;
+	unsigned long clientid, extcaps;
+	char *extcap_str;
 	int networkid;
 	const char *state, *passport, *friendly;
 
@@ -1322,10 +1323,15 @@
 		msn_user_set_object(user, NULL);
 	}
 
-	clientid = strtoul(cmd->params[4], NULL, 10);
+	clientid = strtoul(cmd->params[4], &extcap_str, 10);
+	if (extcap_str && *extcap_str)
+		extcaps = strtoul(extcap_str+1, NULL, 10);
+	else
+		extcaps = 0;
 	user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE) || (user->phone.mobile && user->phone.mobile[0] == '+');
 
 	msn_user_set_clientid(user, clientid);
+	msn_user_set_extcaps(user, extcaps);
 	msn_user_set_network(user, networkid);
 
 	msn_user_set_state(user, state);