summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnkit Vani <a@nevitus.org>2013-10-24 18:17:26 +0530
committerAnkit Vani <a@nevitus.org>2013-10-24 18:17:26 +0530
commit93dbe3ff6472a79e1920ec0275f9aa999560f07c (patch)
tree9d4513d56753e2f6dc3a419fd3059b0c112ceee0
parent5e7baf4475eef41ccb460e64e8b7a8ed21d8e6af (diff)
downloadpidgin-93dbe3ff6472a79e1920ec0275f9aa999560f07c.tar.gz
Moved conn_close_timeout to JabberStream
-rw-r--r--libpurple/protocols/jabber/jabber.c9
-rw-r--r--libpurple/protocols/jabber/jabber.h1
2 files changed, 6 insertions, 4 deletions
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c
index d0eada6ead..d1b9528007 100644
--- 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
index 75b414bf9f..d96b16cbad 100644
--- 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;