[gaim-migrate @ 15288]

Thu, 19 Jan 2006 03:43:30 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Thu, 19 Jan 2006 03:43:30 +0000
changeset 12935
b2d60d1890cc
parent 12934
d3ce70776eb5
child 12936
d2942d796e7c

[gaim-migrate @ 15288]
Fix a bug noted in SF Patch #1293248. We're building an invalid Jabber ID such as: user@server.tld/Resource/Resource

src/protocols/jabber/si.c file | annotate | diff | comparison | revisions
--- a/src/protocols/jabber/si.c	Thu Jan 19 02:44:07 2006 +0000
+++ b/src/protocols/jabber/si.c	Thu Jan 19 03:43:30 2006 +0000
@@ -638,9 +638,12 @@
 
 		/* XXX: for now, send to the first resource available */
 		if(g_list_length(jb->resources) >= 1) {
+			char **who_v = g_strsplit(xfer->who, "/");
 			char *who;
+
 			jbr = jabber_buddy_find_resource(jb, NULL);
-			who = g_strdup_printf("%s/%s", xfer->who, jbr->name);
+			who = g_strdup_printf("%s/%s", who_v[0], jbr->name);
+			g_strfreev(who_v);
 			g_free(xfer->who);
 			xfer->who = who;
 			jabber_disco_info_do(jsx->js, who,

mercurial