]> granicus.if.org Git - curl/commitdiff
[pop3 starttls] PASS command was not sent after upgrade to TLS.
authorBen Noordhuis <info@bnoordhuis.nl>
Thu, 17 Mar 2011 22:07:56 +0000 (23:07 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 5 Apr 2011 11:38:31 +0000 (13:38 +0200)
lib/pop3.c

index ba13e7d6bdef5fda91a7a3b7477b8cd201ebbc46..79af8fc0c5208bcc57abf730deb496a16df6b9c0 100644 (file)
@@ -298,6 +298,7 @@ static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
   if(pop3code != 'O') {
     failf(data, "STARTTLS denied. %c", pop3code);
     result = CURLE_LOGIN_DENIED;
+    state(conn, POP3_STOP);
   }
   else {
     /* Curl_ssl_connect is BLOCKING */
@@ -306,8 +307,10 @@ static CURLcode pop3_state_starttls_resp(struct connectdata *conn,
       pop3_to_pop3s(conn);
       result = pop3_state_user(conn);
     }
+    else {
+      state(conn, POP3_STOP);
+    }
   }
-  state(conn, POP3_STOP);
   return result;
 }