diff libpurple/util.c @ 29298:fb99a0067812

propagate from branch 'im.pidgin.pidgin' (head 70d69397ed952b26b453423c381c70d6783eb66d) to branch 'im.pidgin.cpw.attention_ui' (head 1cf0dea282a0d0e4aeac4770e0150d6d0c10830a)
author Marcus Lundblad <ml@update.uu.se>
date Thu, 13 Aug 2009 17:42:44 +0000
parents da22b6d0151e
children 9358464cdf6a
line wrap: on
line diff
--- a/libpurple/util.c	Tue Jul 28 20:52:33 2009 +0000
+++ b/libpurple/util.c	Thu Aug 13 17:42:44 2009 +0000
@@ -3519,6 +3519,7 @@
 void purple_got_protocol_handler_uri(const char *uri)
 {
 	char proto[11];
+	char delimiter;
 	const char *tmp, *param_string;
 	char *cmd;
 	GHashTable *params = NULL;
@@ -3534,7 +3535,13 @@
 	proto[len] = '\0';
 
 	tmp++;
-	purple_debug_info("util", "Processing message '%s' for protocol '%s'.\n", tmp, proto);
+
+	if (g_str_equal(proto, "xmpp"))
+		delimiter = ';';
+	else
+		delimiter = '&';
+
+	purple_debug_info("util", "Processing message '%s' for protocol '%s' using delimiter '%c'.\n", tmp, proto, delimiter);
 
 	if ((param_string = strchr(tmp, '?'))) {
 		const char *keyend = NULL, *pairstart;
@@ -3547,7 +3554,7 @@
 		pairstart = tmp = param_string;
 
 		while (*tmp || *pairstart) {
-			if (*tmp == '&' || !(*tmp)) {
+			if (*tmp == delimiter || !(*tmp)) {
 				/* If there is no explicit value */
 				if (keyend == NULL)
 					keyend = tmp;