cpw.darkrain42.xmpp.disco: a88cf762: Fix (a bit) browsing pubsub nodes.
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Wed Apr 29 23:46:18 EDT 2009
-----------------------------------------------------------------
Revision: a88cf762337291c4547c8dbe5edd50e8d7bd3d5e
Ancestor: d36744bb5558b30197d840639614630efc15fba0
Author: darkrain42 at pidgin.im
Date: 2009-04-30T00:12:29
Branch: im.pidgin.cpw.darkrain42.xmpp.disco
URL: http://d.pidgin.im/viewmtn/revision/info/a88cf762337291c4547c8dbe5edd50e8d7bd3d5e
Modified files:
libpurple/protocols/jabber/disco.c
ChangeLog:
Fix (a bit) browsing pubsub nodes.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/disco.c 1e5103cae4b726035df385a056d88321a41f59a0
+++ libpurple/protocols/jabber/disco.c a291d203398443c42842580e2bccbf2428b243dc
@@ -750,8 +750,8 @@ jabber_disco_service_info_cb(JabberStrea
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 @@ jabber_disco_service_info_cb(JabberStrea
}
}
- 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 @@ jabber_disco_service_info_cb(JabberStrea
purple_disco_list_set_in_progress(list, FALSE);
purple_disco_list_unref(list);
-
- g_free(node);
}
static void
More information about the Commits
mailing list