diff libpurple/protocols/jabber/disco.c @ 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 49cb3fc2c01a
children deecc1d663c4
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);
 	}