changeset 32486:1a265986ed37

Fix NLN on MSNP18.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 03 Feb 2012 01:29:43 +0000
parents d1ac0c771e19
children ab9025b46134
files libpurple/protocols/msn/notification.c
diffstat 1 files changed, 14 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/notification.c	Fri Feb 03 01:26:14 2012 +0000
+++ b/libpurple/protocols/msn/notification.c	Fri Feb 03 01:29:43 2012 +0000
@@ -1250,15 +1250,22 @@
 	MsnObject *msnobj;
 	unsigned long clientid, extcaps;
 	char *extcap_str;
+	char *passport;
 	int networkid;
-	const char *state, *passport, *friendly;
+	const char *state, *friendly;
 
 	session = cmdproc->session;
 
 	state    = cmd->params[0];
-	passport = cmd->params[1];
-	networkid = atoi(cmd->params[2]);
-	friendly = purple_url_decode(cmd->params[3]);
+	if (session->protocol_ver >= 18) {
+		const char *tmp = cmd->params[1];
+		msn_parse_user(tmp, &passport, &networkid);
+		friendly = purple_url_decode(cmd->params[2]);
+	} else {
+		passport = cmd->params[1];
+		networkid = atoi(cmd->params[2]);
+		friendly = purple_url_decode(cmd->params[3]);
+	}
 
 	user = msn_userlist_find_user(session->userlist, passport);
 	if (user == NULL) return;
@@ -1292,6 +1299,9 @@
 
 	msn_user_set_state(user, state);
 	msn_user_update(user);
+
+	if (session->protocol_ver >= 18)
+		g_free(passport);
 }
 
 #if 0