pidgin: ba251369: Fix NLN on MSNP18.

qulogic at pidgin.im qulogic at pidgin.im
Fri Feb 3 01:56:35 EST 2012


----------------------------------------------------------------------
Revision: ba2513694e6abcbdfddc66820f1df20540a36847
Parent:   86bb401efa33f02ca5d28fea216a39a3cf29b5b4
Author:   qulogic at pidgin.im
Date:     02/02/12 20:29:43
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/ba2513694e6abcbdfddc66820f1df20540a36847

Changelog: 

Fix NLN on MSNP18.

Changes against parent 86bb401efa33f02ca5d28fea216a39a3cf29b5b4

  patched  libpurple/protocols/msn/notification.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c	3ad20847e13dcda8a8daf987f666166eb50671b1
+++ libpurple/protocols/msn/notification.c	4096ba6ec4df607ec0b9627bea8b17fcd5f10e42
@@ -1250,15 +1250,22 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand 
 	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 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand 
 
 	msn_user_set_state(user, state);
 	msn_user_update(user);
+
+	if (session->protocol_ver >= 18)
+		g_free(passport);
 }
 
 #if 0


More information about the Commits mailing list