jabber: disco#info queries with no 'from' are from the server; valid.

Sat, 01 Aug 2009 02:33:41 +0000

author
Paul Aurich <darkrain42@pidgin.im>
date
Sat, 01 Aug 2009 02:33:41 +0000
changeset 28047
0f280c9653d2
parent 28046
8b6fcc2c95b3
child 28048
cdc92f9d634a

jabber: disco#info queries with no 'from' are from the server; valid.

libpurple/protocols/jabber/disco.c file | annotate | diff | comparison | revisions
--- 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);
 	}

mercurial