Mercurial > pidgin
diff libpurple/protocols/jabber/ping.c @ 26567:d00a8111e479
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.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Wed, 15 Apr 2009 01:44:17 +0000 |
parents | ae41d8e827e3 |
children | 75b30b849293 |
line wrap: on
line diff
--- 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");