[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.3,1.4
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.3,1.4 |
Date: |
Wed, 01 Jan 2003 12:35:54 -0500 |
Update of /cvsroot/ayttm/ayttm/modules/msn2
In directory subversions:/tmp/cvs-serv22149/modules/msn2
Modified Files:
msn.C
Log Message:
auto reconnection option
Index: msn.C
===================================================================
RCS file: /cvsroot/ayttm/ayttm/modules/msn2/msn.C,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- msn.C 1 Jan 2003 01:57:56 -0000 1.3
+++ msn.C 1 Jan 2003 17:35:52 -0000 1.4
@@ -138,6 +138,8 @@
/* hack to check conn */
static int waiting_ans = 0;
+static int do_check_connection = 1;
+static int do_reconnect = 1;
static int do_mail_notify = 1;
static int do_mail_notify_show = 1;
@@ -239,6 +241,21 @@
il->widget.checkbox.label = _("Guess status from Away messages");
il->type = EB_INPUT_CHECKBOX;
+ il->next = g_new0(input_list, 1);
+ il = il->next;
+ il->widget.checkbox.value = &do_check_connection;
+ il->widget.checkbox.name = "do_check_connection";
+ il->widget.checkbox.label = _("Check the connection state");
+ il->type = EB_INPUT_CHECKBOX;
+
+ il->next = g_new0(input_list, 1);
+ il = il->next;
+ il->widget.checkbox.value = &do_reconnect;
+ il->widget.checkbox.name = "do_reconnect";
+ il->widget.checkbox.label = _("Reconnect if connection unexpectedly
drops");
+ il->type = EB_INPUT_CHECKBOX;
+
+
psmileys=add_protocol_smiley(psmileys, "(y)", "yes");
psmileys=add_protocol_smiley(psmileys, "(Y)", "yes");
@@ -483,11 +500,18 @@
static int conncheck_handler = -1;
static int checkconn(msnconn *conn) {
- int status;
+ int status = 1;
+ eb_local_account * ela = NULL;
+ char * local_account_name = NULL;
+ local_account_name=((authdata_NS *)conn->auth)->username;
+ ela = find_local_account_by_handle(local_account_name,
SERVICE_INFO.protocol_id);
eb_debug(DBG_MOD, "msn: checking conn\n");
if(waiting_ans > 2) {
eb_debug(DBG_MOD, "msn conn closed !(no answer to fname
set)\n");
close_conn(conn);
+ waiting_ans = 0;
+ eb_msn_login(ela);
+ return 1;
}
if(fname_pref[0]!='\0') {
status = msn_set_friendlyname(conn, fname_pref);
@@ -496,6 +520,9 @@
if (status == 0) {
eb_debug(DBG_MOD, "conn closed... :(\n");
close_conn(conn);
+ waiting_ans = 0;
+ eb_msn_login(ela);
+ return 1;
}
return 1;
}
@@ -528,7 +555,7 @@
account->connected=1;
mlad->status=MSN_ONLINE;
/* hack to check conn status */
- if (conncheck_handler == -1)
+ if (conncheck_handler == -1 && do_check_connection)
conncheck_handler = gtk_timeout_add(10000, (GtkFunction)checkconn,
(gpointer)mlad->mc);
}
@@ -1680,7 +1707,7 @@
/* We're being called as part of an msn_clean_up anyway, so make sure
eb_msn_logout doesn't try to clean up */
mlad->mc=NULL;
eb_msn_logout(ela);
- if (conncheck_handler != -1) {
+ if (conncheck_handler != -1 && do_check_connection) {
gtk_timeout_remove(conncheck_handler);
conncheck_handler = -1;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.3,1.4,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.19,1.20 configure.in,1.18,1.19
- Next by Date:
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.4,1.5
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.19,1.20 configure.in,1.18,1.19
- Next by thread:
[Ayttm-commits] CVS: ayttm/modules/msn2 msn.C,1.4,1.5
- Index(es):