pidgin: 328c6d27: jabber: disco#info queries with no 'from...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Jul 31 23:00:48 EDT 2009


-----------------------------------------------------------------
Revision: 328c6d270bd5a30de90ef6c97c9ed5f274c66d03
Ancestor: fa0b8fdbb0ceb27d29b56339657f490eb6a0f4d8
Author: darkrain42 at pidgin.im
Date: 2009-08-01T02:33:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/328c6d270bd5a30de90ef6c97c9ed5f274c66d03

Modified files:
        libpurple/protocols/jabber/disco.c

ChangeLog: 

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

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/disco.c	28aeca60b7204de78f444e3b2dca4f978ca0465a
+++ libpurple/protocols/jabber/disco.c	b39cecfcf83d180fb0ecbaa5eeb7087852e21d34
@@ -98,10 +98,6 @@ void jabber_disco_info_parse(JabberStrea
                              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 @@ void jabber_disco_info_parse(JabberStrea
 
 		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 @@ void jabber_disco_info_parse(JabberStrea
 		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);
 	}


More information about the Commits mailing list