]> granicus.if.org Git - curl/commitdiff
pop3: Removed unnecessary state changes on failure
authorSteve Holme <steve_holme@hotmail.com>
Fri, 15 Feb 2013 18:33:28 +0000 (18:33 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Fri, 15 Feb 2013 18:33:28 +0000 (18:33 +0000)
lib/pop3.c

index b94f6f7e433813d00e68431ededd79e4d98857f1..d2d49fecc6ca518ba4e2b8197ed4f269f3a5765b 100644 (file)
@@ -977,9 +977,9 @@ static CURLcode pop3_state_auth_final_resp(struct connectdata *conn,
     failf(data, "Authentication failed: %d", pop3code);
     result = CURLE_LOGIN_DENIED;
   }
-
-  /* End of connect phase */
-  state(conn, POP3_STOP);
+  else
+    /* End of connect phase */
+    state(conn, POP3_STOP);
 
   return result;
 }
@@ -997,9 +997,9 @@ static CURLcode pop3_state_apop_resp(struct connectdata *conn, int pop3code,
     failf(data, "Authentication failed: %d", pop3code);
     result = CURLE_LOGIN_DENIED;
   }
-
-  /* End of connect phase */
-  state(conn, POP3_STOP);
+  else
+    /* End of connect phase */
+    state(conn, POP3_STOP);
 
   return result;
 }
@@ -1044,9 +1044,9 @@ static CURLcode pop3_state_pass_resp(struct connectdata *conn, int pop3code,
     failf(data, "Access denied. %c", pop3code);
     result = CURLE_LOGIN_DENIED;
   }
-
-  /* End of connect phase */
-  state(conn, POP3_STOP);
+  else
+    /* End of connect phase */
+    state(conn, POP3_STOP);
 
   return result;
 }