# HG changeset patch # User Paul Aurich # Date 1241067551 0 # Node ID 6faa5d5b4f44af4c5aa4e136cebfe53cb347e41d # Parent 75b30b8492937b8c43e4b5eced1273ca0d22829b Don't breaking if the user runs `/ping ` a bunch. jabber_register_account and jabber_login really need a common 'init JabberStream' function. diff -r 75b30b849293 -r 6faa5d5b4f44 libpurple/protocols/jabber/jabber.c --- a/libpurple/protocols/jabber/jabber.c Thu Apr 30 04:25:01 2009 +0000 +++ b/libpurple/protocols/jabber/jabber.c Thu Apr 30 04:59:11 2009 +0000 @@ -1302,6 +1302,7 @@ js->user = jabber_id_new(purple_account_get_username(account)); js->next_id = g_random_int(); js->old_length = 0; + js->keepalive_timeout = -1; if(!js->user) { purple_connection_error_reason (gc, diff -r 75b30b849293 -r 6faa5d5b4f44 libpurple/protocols/jabber/ping.c --- a/libpurple/protocols/jabber/ping.c Thu Apr 30 04:25:01 2009 +0000 +++ b/libpurple/protocols/jabber/ping.c Thu Apr 30 04:59:11 2009 +0000 @@ -30,8 +30,10 @@ static void jabber_keepalive_pong_cb(JabberStream *js) { - purple_timeout_remove(js->keepalive_timeout); - js->keepalive_timeout = -1; + if (js->keepalive_timeout >= 0) { + purple_timeout_remove(js->keepalive_timeout); + js->keepalive_timeout = -1; + } } void