/soc/2013/ankitkv/gobjectification: 8060985edd4a: Moved conn_clo...
Ankit Vani
a at nevitus.org
Thu Oct 24 08:51:59 EDT 2013
Changeset: 8060985edd4abc3481b989b176391be05e4204b6
Author: Ankit Vani <a at nevitus.org>
Date: 2013-10-24 18:17 +0530
Branch: soc.2013.gobjectification
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/8060985edd4a
Description:
Moved conn_close_timeout to JabberStream
diffstat:
libpurple/protocols/jabber/jabber.c | 9 +++++----
libpurple/protocols/jabber/jabber.h | 1 +
2 files changed, 6 insertions(+), 4 deletions(-)
diffs (50 lines):
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
--- a/libpurple/protocols/jabber/jabber.c
+++ b/libpurple/protocols/jabber/jabber.c
@@ -84,7 +84,6 @@ GList *jabber_identities = NULL;
static GHashTable *jabber_cmds = NULL; /* PurplePlugin * => GSList of ids */
static gint plugin_ref = 0;
-static guint conn_close_timeout = 0;
static void jabber_unregister_account_cb(JabberStream *js);
static void try_srv_connect(JabberStream *js);
@@ -1122,13 +1121,15 @@ conn_close_cb(gpointer data)
purple_account_disconnect(account);
+ js->conn_close_timeout = 0;
+
return FALSE;
}
static void
jabber_connection_schedule_close(JabberStream *js)
{
- conn_close_timeout = purple_timeout_add(0, conn_close_cb, js);
+ js->conn_close_timeout = purple_timeout_add(0, conn_close_cb, js);
}
static void
@@ -1696,8 +1697,8 @@ void jabber_close(PurpleConnection *gc)
purple_timeout_remove(js->keepalive_timeout);
if (js->inactivity_timer != 0)
purple_timeout_remove(js->inactivity_timer);
- if (conn_close_timeout != 0)
- purple_timeout_remove(conn_close_timeout);
+ if (js->conn_close_timeout != 0)
+ purple_timeout_remove(js->conn_close_timeout);
g_free(js->srv_rec);
js->srv_rec = NULL;
diff --git a/libpurple/protocols/jabber/jabber.h b/libpurple/protocols/jabber/jabber.h
--- a/libpurple/protocols/jabber/jabber.h
+++ b/libpurple/protocols/jabber/jabber.h
@@ -257,6 +257,7 @@ struct _JabberStream
guint keepalive_timeout;
guint max_inactivity;
guint inactivity_timer;
+ guint conn_close_timeout;
PurpleSrvResponse *srv_rec;
guint srv_rec_idx;
More information about the Commits
mailing list