# HG changeset patch
# User Nathan Walp <nwalp@pidgin.im>
# Date 1182027581 0
# Node ID 74b5a39819e6d08aa577055a8f5c7db89921c772
# Parent  9b9e202eb4493480cc4cdeea746ec4351e7e04e3
i'm an idiot.  now we have real support for replying to XMPP pings

diff -r 9b9e202eb449 -r 74b5a39819e6 libpurple/protocols/jabber/iq.c
--- a/libpurple/protocols/jabber/iq.c	Sat Jun 16 20:34:35 2007 +0000
+++ b/libpurple/protocols/jabber/iq.c	Sat Jun 16 20:59:41 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 {