0.8.6vlaws114
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 17 Dec 2002 23:31:09 +0000 (23:31 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 17 Dec 2002 23:31:09 +0000 (23:31 +0000)
* src/imap.c
        o don't create a session if imap greeting fails
        o don't close socket when authentication fails
          this is done by imap_session_destroy

ChangeLog.claws
configure.in
src/imap.c

index c820fc5..580c8b8 100644 (file)
@@ -1,3 +1,10 @@
+2002-12-14 [christoph] 0.8.6vlaws114
+
+       * src/imap.c
+               o don't create a session if imap greeting fails
+               o don't close socket when authentication fails
+                 this is done by imap_session_destroy
+
 2002-12-14 [thorsten]  0.8.6claws113
 
        * tools/Makefile.am
index 57c5d01..fddd191 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws113
+EXTRA_VERSION=claws114
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index c4f60b4..b27a637 100644 (file)
@@ -515,11 +515,14 @@ Session *imap_session_new(const PrefsAccount *account)
        }
 
        /* Only need to log in if the connection was not PREAUTH */
-       imap_greeting(imap_sock, &is_preauth);
+       if (imap_greeting(imap_sock, &is_preauth) != IMAP_SUCCESS) {
+               sock_close(imap_sock);
+               return NULL;
+       }
        log_message("IMAP connection is %s-authenticated\n",
                    (is_preauth) ? "pre" : "un");
-       session = g_new(IMAPSession, 1);
 
+       session = g_new(IMAPSession, 1);
        SESSION(session)->type             = SESSION_IMAP;
        SESSION(session)->server           = g_strdup(account->recv_server);
        SESSION(session)->sock             = imap_sock;
@@ -556,7 +559,6 @@ void imap_session_authenticate(IMAPSession *session, const PrefsAccount *account
 
        if (imap_cmd_login(SESSION(session)->sock, account->userid, pass) != IMAP_SUCCESS) {
                imap_cmd_logout(SESSION(session)->sock);
-               sock_close(SESSION(session)->sock);
                return;
        }