soc.2010.msn-tlc: 33b8ae30: Normalize both passports before comparat...

masca at cpw.pidgin.im masca at cpw.pidgin.im
Wed Sep 22 17:15:47 EDT 2010


----------------------------------------------------------------------
Revision: 33b8ae304dffd42211af00431430a5c492f7e6f0
Parent:   7e05802d9bbbc0bc5fa1ce002271c3dad626e272
Author:   masca at cpw.pidgin.im
Date:     09/22/10 17:09:50
Branch:   im.pidgin.soc.2010.msn-tlc
URL: http://d.pidgin.im/viewmtn/revision/info/33b8ae304dffd42211af00431430a5c492f7e6f0

Changelog: 

Normalize both passports before comparation. This fixes the bug that opens a MUC with a buddy that is logged in on mutiple endpoints.

Changes against parent 7e05802d9bbbc0bc5fa1ce002271c3dad626e272

  patched  libpurple/protocols/msn/user.c

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/user.c	643c7f5d09d39a73f62f7a19af95a28180bcdef5
+++ libpurple/protocols/msn/user.c	1b68f8f9bed491429fcb234825c8d96691076bd6
@@ -735,11 +735,17 @@ msn_user_passport_cmp(MsnUser *user, con
 int
 msn_user_passport_cmp(MsnUser *user, const char *passport)
 {
-	const char *pass;
+	const char *str;
+	char *pass;
+	int result;
 
-	pass = purple_normalize_nocase(NULL, msn_user_get_passport(user));
+	str = purple_normalize_nocase(NULL, msn_user_get_passport(user));
+	pass = g_strdup(str);
 
-	return strcmp(pass, purple_normalize_nocase(NULL, passport));
+	result = g_strcmp0(pass, purple_normalize_nocase(NULL, passport));
+	g_free(pass);
+
+	return result;
 }
 
 gboolean


More information about the Commits mailing list