changeset 26972:55e96ee47d0a

Fix (a bit) browsing pubsub nodes.
author Paul Aurich <paul@darkrain42.org>
date Thu, 30 Apr 2009 00:12:29 +0000
parents 58ff88dba33a
children 5afee99de904
files libpurple/protocols/jabber/disco.c
diffstat 1 files changed, 7 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/disco.c	Wed Apr 29 23:23:51 2009 +0000
+++ b/libpurple/protocols/jabber/disco.c	Thu Apr 30 00:12:29 2009 +0000
@@ -750,8 +750,8 @@
 	struct _disco_data *disco_data;
 	struct jabber_disco_list_data *list_data;
 	xmlnode *query, *identity, *child;
-	const char *anode;
-	char *aname, *node;
+	const char *name;
+	char *node;
 
 	PurpleDiscoList *list;
 	PurpleDiscoService *parent, *service;
@@ -810,19 +810,17 @@
 		}
 	}
 
-	if ((anode = xmlnode_get_attrib(query, "node")))
-		aname = g_strconcat(from, anode, NULL);
+	if (node)
+		name = node;
 	else
-		aname = g_strdup(from);
+		name = from; 
 
 	service_data = g_new0(struct jabber_disco_service_data, 1);
 	service_data->jid = g_strdup(from);
-	if (anode)
-		service_data->node = g_strdup(anode);
+	service_data->node = node;
 
-	service = purple_disco_list_service_new(service_type, aname,
+	service = purple_disco_list_service_new(service_type, name,
 			xmlnode_get_attrib(identity, "name"), flags, service_data);
-	g_free(aname);
 
 	if (service_type == PURPLE_DISCO_SERVICE_TYPE_GATEWAY)
 		purple_disco_service_set_gateway_type(service,
@@ -835,8 +833,6 @@
 		purple_disco_list_set_in_progress(list, FALSE);
 
 	purple_disco_list_unref(list);
-
-	g_free(node);
 }
 
 static void