summaryrefslogtreecommitdiff
path: root/pidgin/gtkconn.c
diff options
context:
space:
mode:
authorWill Thompson <resiak@pidgin.im>2007-09-17 17:51:22 +0000
committerWill Thompson <resiak@pidgin.im>2007-09-17 17:51:22 +0000
commit56b530118d0dffe99980b718d3f8075537fbcb4a (patch)
tree8e3454c88e783b30b2b20be32c50280e47c62d83 /pidgin/gtkconn.c
parent9a7e0c936240733aa59b14510f11e0b83852cc06 (diff)
parent9553a57357b0b06bcd7063c210bf31fa169ca21f (diff)
downloadpidgin-56b530118d0dffe99980b718d3f8075537fbcb4a.tar.gz
propagate from branch 'im.pidgin.pidgin' (head 1ccc3fc7f39ec71e356e5fb2b3794ebc1bc857d8)
to branch 'im.pidgin.cpw.resiak.disconnectreason' (head 786f26a8dc6f51d718fbea247873453e2314aa80)
Diffstat (limited to 'pidgin/gtkconn.c')
-rw-r--r--pidgin/gtkconn.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/pidgin/gtkconn.c b/pidgin/gtkconn.c
index 96de13a560..65f3a80afe 100644
--- a/pidgin/gtkconn.c
+++ b/pidgin/gtkconn.c
@@ -1,8 +1,9 @@
/*
* @file gtkconn.c GTK+ Connection API
* @ingroup pidgin
- *
- * pidgin
+ */
+
+/* pidgin
*
* Pidgin is the legal property of its developers, whose names are too numerous
* to list here. Please refer to the COPYRIGHT file distributed with this
@@ -53,7 +54,7 @@ typedef struct {
* The key is a pointer to the PurpleAccount and the
* value is a pointer to a PidginAutoRecon.
*/
-static GHashTable *hash = NULL;
+static GHashTable *auto_reconns = NULL;
static void
pidgin_connection_connect_progress(PurpleConnection *gc,
@@ -80,7 +81,7 @@ pidgin_connection_connected(PurpleConnection *gc)
pidgin_status_box_set_connecting(PIDGIN_STATUS_BOX(gtkblist->statusbox),
(purple_connections_get_connecting() != NULL));
- g_hash_table_remove(hash, account);
+ g_hash_table_remove(auto_reconns, account);
pidgin_blist_update_account_error_state(account, NULL);
}
@@ -120,7 +121,7 @@ do_signon(gpointer data)
purple_debug_info("autorecon", "do_signon called\n");
g_return_val_if_fail(account != NULL, FALSE);
- info = g_hash_table_lookup(hash, account);
+ info = g_hash_table_lookup(auto_reconns, account);
if (info)
info->timeout = 0;
@@ -145,13 +146,13 @@ pidgin_connection_report_disconnect_reason (PurpleConnection *gc,
PidginAutoRecon *info;
account = purple_connection_get_account(gc);
- info = g_hash_table_lookup(hash, account);
+ info = g_hash_table_lookup(auto_reconns, account);
pidgin_blist_update_account_error_state(account, text);
if (!purple_connection_reason_is_fatal (reason)) {
if (info == NULL) {
info = g_new0(PidginAutoRecon, 1);
- g_hash_table_insert(hash, account, info);
+ g_hash_table_insert(auto_reconns, account, info);
info->delay = g_random_int_range(INITIAL_RECON_DELAY_MIN, INITIAL_RECON_DELAY_MAX);
} else {
info->delay = MIN(2 * info->delay, MAX_RECON_DELAY);
@@ -162,7 +163,7 @@ pidgin_connection_report_disconnect_reason (PurpleConnection *gc,
} else {
char *p, *s, *n=NULL ;
if (info != NULL)
- g_hash_table_remove(hash, account);
+ g_hash_table_remove(auto_reconns, account);
if (purple_account_get_alias(account))
{
@@ -206,7 +207,7 @@ static void pidgin_connection_network_connected ()
while (list) {
PurpleAccount *account = (PurpleAccount*)list->data;
- g_hash_table_remove(hash, account);
+ g_hash_table_remove(auto_reconns, account);
if (purple_account_is_disconnected(account))
do_signon(account);
list = list->next;
@@ -267,7 +268,7 @@ pidgin_connections_get_ui_ops(void)
static void
account_removed_cb(PurpleAccount *account, gpointer user_data)
{
- g_hash_table_remove(hash, account);
+ g_hash_table_remove(auto_reconns, account);
pidgin_blist_update_account_error_state(account, NULL);
}
@@ -288,7 +289,7 @@ pidgin_connection_get_handle(void)
void
pidgin_connection_init(void)
{
- hash = g_hash_table_new_full(
+ auto_reconns = g_hash_table_new_full(
g_direct_hash, g_direct_equal,
NULL, free_auto_recon);
@@ -302,5 +303,5 @@ pidgin_connection_uninit(void)
{
purple_signals_disconnect_by_handle(pidgin_connection_get_handle());
- g_hash_table_destroy(hash);
+ g_hash_table_destroy(auto_reconns);
}