changeset 18126:590bd623d7db

merge of 'c51336971442c17c683e99ca9e7d1f16f839e488' and 'ca5bc719bc984cb13992e9bbe435c54f5ea982a7'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 16 Jun 2007 21:23:24 +0000
parents 3a1f328cc6a8 (current diff) 74b5a39819e6 (diff)
children 26c5acb6eb49
files
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/iq.c	Sat Jun 16 21:17:57 2007 +0000
+++ b/libpurple/protocols/jabber/iq.c	Sat Jun 16 21:23:24 2007 +0000
@@ -208,13 +208,18 @@
 
 static void urn_xmpp_ping_parse(JabberStream *js, xmlnode *packet)
 {
-	const char *type, *id;
+	const char *type, *id, *from;
 	JabberIq *iq;
 
+	type = xmlnode_get_attrib(packet, "type");
+	from = xmlnode_get_attrib(packet, "from");
+	id = xmlnode_get_attrib(packet, "id");
+
 	if(type && !strcmp(type, "get")) {
 		iq = jabber_iq_new_query(js, JABBER_IQ_RESULT, "urn:xmpp:ping");
 
 		jabber_iq_set_id(iq, id);
+		xmlnode_set_attrib(iq->node, "to", from);
 
 		jabber_iq_send(iq);
 	} else {