changeset 28113:cbbde19ce02d

jabber: disco#info queries with no 'from' are from the server; valid.
author Paul Aurich <paul@darkrain42.org>
date Sat, 01 Aug 2009 02:33:41 +0000
parents 1ea1aee71848
children 93d9cf1151a4
files libpurple/protocols/jabber/disco.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/disco.c	Sat Aug 01 01:53:02 2009 +0000
+++ b/libpurple/protocols/jabber/disco.c	Sat Aug 01 02:33:41 2009 +0000
@@ -98,10 +98,6 @@
                              JabberIqType type, const char *id,
                              xmlnode *in_query)
 {
-
-	if(!from)
-		return;
-
 	if(type == JABBER_IQ_GET) {
 		xmlnode *query, *identity, *feature;
 		JabberIq *iq;
@@ -116,7 +112,8 @@
 
 		jabber_iq_set_id(iq, id);
 
-		xmlnode_set_attrib(iq->node, "to", from);
+		if (from)
+			xmlnode_set_attrib(iq->node, "to", from);
 		query = xmlnode_get_child(iq->node, "query");
 
 		if(node)
@@ -208,7 +205,8 @@
 		xmlnode_set_namespace(bad_request, "urn:ietf:params:xml:ns:xmpp-stanzas");
 
 		jabber_iq_set_id(iq, id);
-		xmlnode_set_attrib(iq->node, "to", from);
+		if (from)
+			xmlnode_set_attrib(iq->node, "to", from);
 
 		jabber_iq_send(iq);
 	}