im.pidgin.pidgin: d03ce5e2bc3aaa6ee963e1ebced007175aaa099f

nosnilmot at pidgin.im nosnilmot at pidgin.im
Tue Nov 27 20:40:50 EST 2007


-----------------------------------------------------------------
Revision: d03ce5e2bc3aaa6ee963e1ebced007175aaa099f
Ancestor: cd4038a435bd39cc62244d5614b8d94ad689d8bf
Author: nosnilmot at pidgin.im
Date: 2007-11-28T01:30:04
Branch: im.pidgin.pidgin

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

ChangeLog: 

We should have the check to make sure we only set our own display name here
too, even though this isn't (yet) a problem here

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/notification.c	676f7706c7955caf650894a4fab205d179155300
+++ libpurple/protocols/msn/notification.c	40e305f3fe0c683ee05afa2125c7abd2ccebb7d7
@@ -1181,14 +1181,27 @@ rea_cmd(MsnCmdProc *cmdproc, MsnCommand 
 static void
 rea_cmd(MsnCmdProc *cmdproc, MsnCommand *cmd)
 {
-	/* TODO: This might be for us too */
-
 	MsnSession *session;
+	PurpleAccount *account;
 	PurpleConnection *gc;
 	const char *friendly;
+	char *username;
 
 	session = cmdproc->session;
-	gc = session->account->gc;
+	account = session->account;
+	username = g_strdup(purple_normalize(account,
+						purple_account_get_username(account)));
+
+	/* Only set display name if our *own* friendly name changed! */
+	if (strcmp(username, purple_normalize(account, cmd->params[2])))
+	{
+		g_free(username);
+		return;
+	}
+
+	g_free(username);
+
+	gc = account->gc;
 	friendly = purple_url_decode(cmd->params[3]);
 
 	purple_connection_set_display_name(gc, friendly);


More information about the Commits mailing list