Mercurial > pidgin.yaz
changeset 26841:6faa5d5b4f44
Don't breaking if the user runs `/ping <user's server>` a bunch.
jabber_register_account and jabber_login really need a common 'init JabberStream' function.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 30 Apr 2009 04:59:11 +0000 |
parents | 75b30b849293 |
children | f67f24008334 |
files | libpurple/protocols/jabber/jabber.c libpurple/protocols/jabber/ping.c |
diffstat | 2 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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,
--- 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