summaryrefslogtreecommitdiff
path: root/pidgin
diff options
context:
space:
mode:
authorWill Thompson <resiak@pidgin.im>2007-10-24 14:20:16 +0000
committerWill Thompson <resiak@pidgin.im>2007-10-24 14:20:16 +0000
commitbec5d955e9fc4cd71fe5cb91cd3a6ed209e2a03b (patch)
treedb9fb1f7d7e64beee73ec1b0146f57be664c6b66 /pidgin
parentaf3d97020808a3d4e6f25b7403a015aebd670378 (diff)
parentfe91ee63553fe160a6f38877d05c9173d9cb36d1 (diff)
downloadpidgin-bec5d955e9fc4cd71fe5cb91cd3a6ed209e2a03b.tar.gz
propagate from branch 'im.pidgin.pidgin.next.minor' (head 68ed8c19d7f59dcb411b00ebb112017b58fd559b)
to branch 'im.pidgin.cpw.resiak.disconnectreason' (head 50996a7d8d5519eccadb7d09e663e78e1f057009)
Diffstat (limited to 'pidgin')
-rw-r--r--pidgin/gtkconn.c37
1 files changed, 30 insertions, 7 deletions
diff --git a/pidgin/gtkconn.c b/pidgin/gtkconn.c
index 502183b593..abc5bef0d5 100644
--- a/pidgin/gtkconn.c
+++ b/pidgin/gtkconn.c
@@ -42,6 +42,7 @@
#define INITIAL_RECON_DELAY_MAX 60000
#define MAX_RECON_DELAY 600000
+#define MAX_RACCOON_DELAY "shorter in urban areas"
typedef struct {
int delay;
@@ -137,7 +138,9 @@ do_signon(gpointer data)
}
static void
-pidgin_connection_report_disconnect(PurpleConnection *gc, const char *text)
+pidgin_connection_report_disconnect_reason (PurpleConnection *gc,
+ PurpleConnectionError reason,
+ const char *text)
{
PurpleAccount *account = NULL;
PidginAutoRecon *info;
@@ -147,7 +150,7 @@ pidgin_connection_report_disconnect(PurpleConnection *gc, const char *text)
info = g_hash_table_lookup(auto_reconns, account);
pidgin_blist_update_account_error_state(account, text);
- if (!gc->wants_to_die) {
+ if (!purple_connection_error_is_fatal (reason)) {
if (info == NULL) {
info = g_new0(PidginAutoRecon, 1);
g_hash_table_insert(auto_reconns, account, info);
@@ -178,9 +181,29 @@ pidgin_connection_report_disconnect(PurpleConnection *gc, const char *text)
}
p = g_strdup_printf(_("%s disconnected"), n);
- s = g_strdup_printf(_("%s\n\n"
- "%s will not attempt to reconnect the account until you "
- "correct the error and re-enable the account."), text, PIDGIN_NAME);
+ switch (reason)
+ {
+ case PURPLE_CONNECTION_ERROR_NO_SSL_SUPPORT:
+ s = g_strdup_printf(
+ _("%s\n\n"
+ "%s will not attempt to reconnect the account until you "
+ "re-enable the account. See %s for information on how to "
+ "compile %s with SSL support."), text, PIDGIN_NAME,
+ "http://developer.pidgin.im/wiki/FAQssl", PIDGIN_NAME);
+ break;
+ case PURPLE_CONNECTION_ERROR_NAME_IN_USE:
+ s = g_strdup_printf(
+ _("%s\n\n"
+ "%s will not attempt to reconnect the account until you "
+ "re-enable it."), text, PIDGIN_NAME);
+ break;
+ default:
+ s = g_strdup_printf(
+ _("%s\n\n"
+ "%s will not attempt to reconnect the account until you "
+ "correct the error and re-enable the account."), text,
+ PIDGIN_NAME);
+ }
purple_notify_error(NULL, NULL, p, s);
g_free(p);
g_free(s);
@@ -259,10 +282,10 @@ static PurpleConnectionUiOps conn_ui_ops =
pidgin_connection_connected,
pidgin_connection_disconnected,
pidgin_connection_notice,
- pidgin_connection_report_disconnect,
+ NULL, /* report_disconnect */
pidgin_connection_network_connected,
pidgin_connection_network_disconnected,
- NULL,
+ pidgin_connection_report_disconnect_reason,
NULL,
NULL,
NULL