2007-09-30 [colin] 3.0.1cvs48
authorColin Leroy <colin@colino.net>
Sun, 30 Sep 2007 09:01:58 +0000 (09:01 +0000)
committerColin Leroy <colin@colino.net>
Sun, 30 Sep 2007 09:01:58 +0000 (09:01 +0000)
* src/imap.c
Reset folder's session to NULL
before destroying it

ChangeLog
PATCHSETS
configure.ac
src/imap.c

index 110c4242c88d1dbfd3eafef7bb615fc9e528611c..2fb315a500e9ec57fa5a2d2440a6086cfac62cd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-30 [colin]     3.0.1cvs48
+
+       * src/imap.c
+               Reset folder's session to NULL
+               before destroying it
+
 2007-09-30 [mones]     3.0.1cvs47
 
        * manual/handling.xml
index 280dc5481806d5303d69b180831f0e9775dc6688..2e755c0dfdbc3045be2d728993a06870d9ad2370 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.60.2.97 -r 1.60.2.98 src/addressbook.c;  cvs diff -u -r 1.28.2.30 -r 1.28.2.31 src/addrindex.c;  ) > 3.0.1cvs45.patchset
 ( cvs diff -u -r 1.179.2.188 -r 1.179.2.189 src/imap.c;  ) > 3.0.1cvs46.patchset
 ( cvs diff -u -r 1.1.2.15 -r 1.1.2.16 manual/handling.xml;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 manual/es/handling.xml;  ) > 3.0.1cvs47.patchset
+( cvs diff -u -r 1.179.2.189 -r 1.179.2.190 src/imap.c;  ) > 3.0.1cvs48.patchset
index 77590c066f1aaae39dc6eecff7487189c9848cd3..2dde47c5f778f5b417879e83cbb11c4949e3f645 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=47
+EXTRA_VERSION=48
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 692ce2657d8696dc763c2791d79c1d56f55162bd..8f1981cef839217e89d7b7e0fc124d1e5df35d80 100644 (file)
@@ -677,6 +677,7 @@ static IMAPSession *imap_reconnect_if_possible(Folder *folder, IMAPSession *sess
                session_destroy(SESSION(session));
                session = NULL;
        } else {
+               rfolder->session = NULL;
                log_warning(LOG_PROTOCOL, _("IMAP4 connection to %s has been"
                            " disconnected. Reconnecting...\n"),
                            folder->account->recv_server);
@@ -689,7 +690,6 @@ static IMAPSession *imap_reconnect_if_possible(Folder *folder, IMAPSession *sess
                   a new session, because of rfolder->session == NULL
                   it will not try to reconnect again and so avoid an
                   endless loop */
-               rfolder->session = NULL;
                debug_print("getting session...\n");
                session = imap_session_get(folder);
                rfolder->session = SESSION(session);
@@ -745,11 +745,10 @@ static void imap_disc_session_destroy(Folder *folder)
        session = IMAP_SESSION(rfolder->session);
        if (!session)
                return;
-
+       rfolder->session = NULL;
        log_warning(LOG_PROTOCOL, _("IMAP4 connection broken\n"));
        SESSION(session)->state = SESSION_DISCONNECTED;
        session_destroy(SESSION(session));
-       rfolder->session = NULL;
 }
 
 static IMAPSession *imap_session_get(Folder *folder)
@@ -793,9 +792,9 @@ static IMAPSession *imap_session_get(Folder *folder)
        
        if (!IMAP_SESSION(session)->authenticated) {
                imap_threaded_disconnect(session->folder);
+               rfolder->session = NULL;
                SESSION(session)->state = SESSION_DISCONNECTED;
                session_destroy(SESSION(session));
-               rfolder->session = NULL;
                rfolder->last_failure = time(NULL);
                rfolder->connecting = FALSE;
                return NULL;