2006-03-06 [colin] 2.0.0cvs115
authorColin Leroy <colin@colino.net>
Mon, 6 Mar 2006 20:46:55 +0000 (20:46 +0000)
committerColin Leroy <colin@colino.net>
Mon, 6 Mar 2006 20:46:55 +0000 (20:46 +0000)
* src/imap.c
Prevent double-timeouts when connection fails

ChangeLog
PATCHSETS
configure.ac
src/imap.c

index 28ad65a9e6b3eec654259ce942abb53a5243683b..2a1dd601074d4f4cb428ba4d58446f4efa3501f1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-03-06 [colin]     2.0.0cvs115
+
+       * src/imap.c
+               Prevent double-timeouts when connection fails
+
 2006-03-06 [colin]
 
        2.0.1-rc1 released
index 91c77e0fa88295dbdb0c3a0aee0804826573595b..97baabbbca69084265df0c0fb3eca6d9ab82698e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.204.2.77 -r 1.204.2.78 src/prefs_common.c;  cvs diff -u -r 1.103.2.43 -r 1.103.2.44 src/prefs_common.h;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_msg_colors.c;  cvs diff -u -r 1.395.2.179 -r 1.395.2.180 src/summaryview.c;  cvs diff -u -r 1.68.2.18 -r 1.68.2.19 src/summaryview.h;  cvs diff -u -r 1.2.2.10 -r 1.2.2.11 src/gtk/colorlabel.c;  cvs diff -u -r 1.1.4.2 -r 1.1.4.3 src/gtk/colorlabel.h;  ) > 2.0.0cvs112.patchset
 ( cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/prefs_msg_colors.h;  ) > 2.0.0cvs113.patchset
 ( cvs diff -u -r 1.179.2.96 -r 1.179.2.97 src/imap.c;  ) > 2.0.0cvs114.patchset
+( cvs diff -u -r 1.179.2.97 -r 1.179.2.98 src/imap.c;  ) > 2.0.0cvs115.patchset
index 43983f1e3a7e6b2c02e850dbc12bbe9c1a739b99..8da1fe8b6370b4d1bd275bcf68d8aa96657d7cd1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=114
+EXTRA_VERSION=115
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9c5bf757211c978e41efca4c849ed01f9477a361..07826cc7134276bd78eb9bb634dde43aac9bd530 100644 (file)
@@ -676,6 +676,7 @@ static IMAPSession *imap_session_get(Folder *folder)
 {
        RemoteFolder *rfolder = REMOTE_FOLDER(folder);
        IMAPSession *session = NULL;
+       static time_t last_failure = 0;
 
        g_return_val_if_fail(folder != NULL, NULL);
        g_return_val_if_fail(FOLDER_CLASS(folder) == &imap_class, NULL);
@@ -697,10 +698,14 @@ static IMAPSession *imap_session_get(Folder *folder)
                } */
        } else {
                imap_reset_uid_lists(folder);
+               if (time(NULL) - last_failure <= 2)
+                       return NULL;
                session = imap_session_new(folder, folder->account);
        }
-       if(session == NULL)
+       if(session == NULL) {
+               last_failure = time(NULL);
                return NULL;
+       }
 
        /* Make sure session is authenticated */
        if (!IMAP_SESSION(session)->authenticated)