Mercurial > pidgin.yaz
comparison finch/gntconn.c @ 20685:02df6998b466
propagate from branch 'im.pidgin.rlaager.merging.2_2_1_conflicts' (head 4ad1081695d083df424898e6e7091f731b401265)
to branch 'im.pidgin.pidgin' (head d33243e8f5347776c81f81a0e4ba3a76ae5505a5)
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 28 Sep 2007 16:34:43 +0000 |
parents | 6b8bc3309ab7 6bf32c9e15a7 |
children | fdefa5eb46e2 |
comparison
equal
deleted
inserted
replaced
20258:509ca8ebe515 | 20685:02df6998b466 |
---|---|
103 static void | 103 static void |
104 finch_connection_report_disconnect(PurpleConnection *gc, const char *text) | 104 finch_connection_report_disconnect(PurpleConnection *gc, const char *text) |
105 { | 105 { |
106 FinchAutoRecon *info; | 106 FinchAutoRecon *info; |
107 PurpleAccount *account = purple_connection_get_account(gc); | 107 PurpleAccount *account = purple_connection_get_account(gc); |
108 | 108 GList *list; |
109 info = g_hash_table_lookup(hash, account); | |
110 | 109 |
111 if (!gc->wants_to_die) { | 110 if (!gc->wants_to_die) { |
111 info = g_hash_table_lookup(hash, account); | |
112 | |
112 if (info == NULL) { | 113 if (info == NULL) { |
113 info = g_new0(FinchAutoRecon, 1); | 114 info = g_new0(FinchAutoRecon, 1); |
114 g_hash_table_insert(hash, account, info); | 115 g_hash_table_insert(hash, account, info); |
115 info->delay = g_random_int_range(INITIAL_RECON_DELAY_MIN, INITIAL_RECON_DELAY_MAX); | 116 info->delay = g_random_int_range(INITIAL_RECON_DELAY_MIN, INITIAL_RECON_DELAY_MAX); |
116 } else { | 117 } else { |
139 g_free(act); | 140 g_free(act); |
140 g_free(primary); | 141 g_free(primary); |
141 g_free(secondary); | 142 g_free(secondary); |
142 purple_account_set_enabled(account, FINCH_UI, FALSE); | 143 purple_account_set_enabled(account, FINCH_UI, FALSE); |
143 } | 144 } |
145 | |
146 /* If we have any open chats, we probably want to rejoin when we get back online. */ | |
147 list = purple_get_chats(); | |
148 while (list) { | |
149 PurpleConversation *conv = list->data; | |
150 list = list->next; | |
151 if (conv->account != account || | |
152 purple_conv_chat_has_left(PURPLE_CONV_CHAT(conv))) | |
153 continue; | |
154 purple_conversation_set_data(conv, "want-to-rejoin", GINT_TO_POINTER(TRUE)); | |
155 } | |
144 } | 156 } |
145 | 157 |
146 static void | 158 static void |
147 account_removed_cb(PurpleAccount *account, gpointer user_data) | 159 account_removed_cb(PurpleAccount *account, gpointer user_data) |
148 { | 160 { |