]> granicus.if.org Git - curl/commitdiff
pop3_doing: Applied debug info message when function fails
authorSteve Holme <steve_holme@hotmail.com>
Sat, 29 Dec 2012 23:26:17 +0000 (23:26 +0000)
committerSteve Holme <steve_holme@hotmail.com>
Sat, 29 Dec 2012 23:26:17 +0000 (23:26 +0000)
Applied the same debug message as used in smtp_doing() and imap_doing()
when pop3_multi_statemach() fails.

lib/pop3.c

index 1972d6311862ef225a418d39343607a99e219c8d..9d6c68ba779b395fda17e0cbbb33934226d534f5 100644 (file)
@@ -1550,13 +1550,16 @@ static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected)
 /* Called from multi.c while DOing */
 static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done)
 {
-  CURLcode result;
-  result = pop3_multi_statemach(conn, dophase_done);
+  CURLcode result = pop3_multi_statemach(conn, dophase_done);
 
-  if(!result && *dophase_done) {
-    result = pop3_dophase_done(conn, FALSE /* not connected */);
+  if(result)
+    DEBUGF(infof(conn->data, "DO phase failed\n"));
+  else {
+    if(*dophase_done) {
+      result = pop3_dophase_done(conn, FALSE /* not connected */);
 
-    DEBUGF(infof(conn->data, "DO phase is complete\n"));
+      DEBUGF(infof(conn->data, "DO phase is complete\n"));
+    }
   }
 
   return result;