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 c820fc53667573f935911d186b79517995a30c6b..580c8b86870b95bd564e3ee351383f0616835e6d 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 57c5d0101de1088d8fa24f191c20f72fe97542f4..fddd191fc8820b891fc7b5377f704419426aa396 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 c4f60b4bf62b8401bc7b49de575ea21630809f4d..b27a63755b339c04185836df8c40874606853dbc 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;
        }