pidgin: 1d1bc145: Don't breaking if the user runs `/ping <..

darkrain42 at pidgin.im darkrain42 at pidgin.im
Thu Apr 30 01:01:17 EDT 2009


-----------------------------------------------------------------
Revision: 1d1bc145399f692d55db04d75f6f6ae59943450d
Ancestor: 53e5db8f67625c5fe432b4ec207cdc3f6a820c75
Author: darkrain42 at pidgin.im
Date: 2009-04-30T04:59:11
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1d1bc145399f692d55db04d75f6f6ae59943450d

Modified files:
        libpurple/protocols/jabber/jabber.c
        libpurple/protocols/jabber/ping.c

ChangeLog: 

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.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	b294bf8496ff8770fc09544de29127bdd249a0df
+++ libpurple/protocols/jabber/jabber.c	26d718a41e4651b5ed0ac0817143325f84a21fd7
@@ -1302,6 +1302,7 @@ void jabber_register_account(PurpleAccou
 	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,
============================================================
--- libpurple/protocols/jabber/ping.c	c7a4879d8eb35827324d43e881132ec5ce056f20
+++ libpurple/protocols/jabber/ping.c	ffdd7f6e30b2315ae6cb61d9b16599ac486493a6
@@ -30,8 +30,10 @@ static void jabber_keepalive_pong_cb(Jab
 
 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


More information about the Commits mailing list