# HG changeset patch # User Paul Aurich # Date 1239759857 0 # Node ID d00a8111e4792e07d21598e592a10b12fc6f2f9a # Parent 8c3b1a059ecc6c2e67e2db2db9567eb1c7b557aa Send XMPP keepalive pings to our server, not our bare JID. jabberd doesn't seem to follow the same semantics for a non-existent 'to' on a stanza; the response comes from our own full JID. Addressing the pings to the server's JID should sidestep that problem. diff -r 8c3b1a059ecc -r d00a8111e479 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Sun Apr 12 23:57:27 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Wed Apr 15 01:44:17 2009 +0000 @@ -463,7 +463,7 @@ JabberStream *js = gc->proto_data; if (js->keepalive_timeout == -1) { - jabber_ping_jid(js, NULL); + jabber_ping_jid(js, js->user->domain); js->keepalive_timeout = purple_timeout_add_seconds(120, (GSourceFunc)(jabber_keepalive_timeout), gc); } diff -r 8c3b1a059ecc -r d00a8111e479 libpurple/protocols/jabber/ping.c --- a/libpurple/protocols/jabber/ping.c Sun Apr 12 23:57:27 2009 +0000 +++ b/libpurple/protocols/jabber/ping.c Wed Apr 15 01:44:17 2009 +0000 @@ -55,15 +55,10 @@ JabberIqType type, const char *id, xmlnode *packet, gpointer data) { - char *own_bare_jid = g_strdup_printf("%s@%s", js->user->node, - js->user->domain); - - if (!from || !strcmp(from, own_bare_jid)) { - /* If the pong is from our bare JID, treat it as a return from the + if (purple_strequal(from, js->user->domain)) + /* If the pong is from the server, assume it's a result of the * keepalive functions */ jabber_keepalive_pong_cb(js); - } - g_free(own_bare_jid); if (type == JABBER_IQ_RESULT) { purple_debug_info("jabber", "PONG!\n");