pidgin: 5e5fb77d: Deal with the hostname being a substring...

datallah at pidgin.im datallah at pidgin.im
Sun Oct 3 22:40:53 EDT 2010


----------------------------------------------------------------------
Revision: 5e5fb77dfbc7ace572bd9afd1222fa1f069a2e3b
Parent:   958ca7ce54d7b9ca8ca24659a4a1beb1d18a16a8
Author:   datallah at pidgin.im
Date:     10/03/10 22:33:28
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/5e5fb77dfbc7ace572bd9afd1222fa1f069a2e3b

Changelog: 

Deal with the hostname being a substring of the account name prior to the '@'

Changes against parent 958ca7ce54d7b9ca8ca24659a4a1beb1d18a16a8

  patched  libpurple/protocols/bonjour/mdns_common.c

-------------- next part --------------
============================================================
--- libpurple/protocols/bonjour/mdns_common.c	5c4193610db1c3e2eec72b99f169f04ce024f083
+++ libpurple/protocols/bonjour/mdns_common.c	9ac6232226f1774d123022c929729861fb9be9e2
@@ -265,8 +265,8 @@ bonjour_dns_sd_set_jid(PurpleAccount *ac
 	 * That is what this is intended to deal with.
 	 */
 	if ((tmp = strchr(account_name, '@'))
-	    && strstr(account_name, hostname) == ++tmp
-	    && *(tmp + strlen(hostname)) == '\0')
+	    && strstr(tmp, hostname) == (tmp + 1)
+	    && *((tmp + 1) + strlen(hostname)) == '\0')
 		bd->jid = g_strdup(account_name);
 	else {
 		const char *tmp2;
@@ -284,4 +284,4 @@ bonjour_dns_sd_set_jid(PurpleAccount *ac
 
 		bd->jid = g_string_free(str, FALSE);
 	}
-}
\ No newline at end of file
+}


More information about the Commits mailing list