pidgin: 3f550d20: Strip spaces when normalizing MSN userna...

qulogic at pidgin.im qulogic at pidgin.im
Tue Mar 1 01:40:56 EST 2011


----------------------------------------------------------------------
Revision: 3f550d201ad4d5437fe3d647a70d657f64e6344d
Parent:   1f1d80e90a5b898d841e2c6f1f5135a98fe14f96
Author:   qulogic at pidgin.im
Date:     03/01/11 00:09:26
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3f550d201ad4d5437fe3d647a70d657f64e6344d

Changelog: 

Strip spaces when normalizing MSN usernames. Spaces in the account
name magically worked, but caused weird problems such as broken
don't-open-a-chat-on-MPOP logic.

Fixes #13173.

Changes against parent 1f1d80e90a5b898d841e2c6f1f5135a98fe14f96

  patched  libpurple/protocols/msn/msn.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	5776381396d6ea737e23e1b39a826f90d9306e2d
+++ libpurple/protocols/msn/msn.c	d76f8edd12c54c358fe5a69d3c6336df44d8e0eb
@@ -110,11 +110,9 @@ msn_normalize(const PurpleAccount *accou
 
 	g_return_val_if_fail(str != NULL, NULL);
 
-	g_snprintf(buf, sizeof(buf), "%s%s", str,
-			   (strchr(str, '@') ? "" : "@hotmail.com"));
-
-	tmp = g_utf8_strdown(buf, -1);
-	strncpy(buf, tmp, sizeof(buf));
+	tmp = g_strchomp(g_utf8_strdown(str, -1));
+	g_snprintf(buf, sizeof(buf), "%s%s", tmp,
+			   (strchr(tmp, '@') ? "" : "@hotmail.com"));
 	g_free(tmp);
 
 	return buf;


More information about the Commits mailing list