CURLcode result = CURLE_OK;
/* Send the LOGOUT command */
- result = imap_sendf(conn, "LOGOUT", NULL);
- if(result)
- return result;
+ result = imap_sendf(conn, "LOGOUT");
- state(conn, IMAP_LOGOUT);
-
- result = imap_block_statemach(conn);
+ if(!result)
+ state(conn, IMAP_LOGOUT);
return result;
}
/* The IMAP session may or may not have been allocated/setup at this
point! */
if(!dead_connection && imapc->pp.conn)
- (void)imap_logout(conn); /* ignore errors on LOGOUT */
+ if(!imap_logout(conn))
+ (void)imap_block_statemach(conn); /* ignore errors on LOGOUT */
/* Disconnect from the server */
Curl_pp_disconnect(&imapc->pp);
CURLcode result = CURLE_OK;
/* Send the QUIT command */
- result = Curl_pp_sendf(&conn->proto.pop3c.pp, "QUIT", NULL);
- if(result)
- return result;
+ result = Curl_pp_sendf(&conn->proto.pop3c.pp, "QUIT");
- state(conn, POP3_QUIT);
-
- result = pop3_block_statemach(conn);
+ if(!result)
+ state(conn, POP3_QUIT);
return result;
}
/* The POP3 session may or may not have been allocated/setup at this
point! */
if(!dead_connection && pop3c->pp.conn)
- (void)pop3_quit(conn); /* ignore errors on QUIT */
+ if(!pop3_quit(conn))
+ (void)pop3_block_statemach(conn); /* ignore errors on QUIT */
/* Disconnect from the server */
Curl_pp_disconnect(&pop3c->pp);
/* Send the QUIT command */
result = Curl_pp_sendf(&conn->proto.smtpc.pp, "QUIT");
- if(result)
- return result;
- state(conn, SMTP_QUIT);
-
- result = smtp_block_statemach(conn);
+ if(!result)
+ state(conn, SMTP_QUIT);
return result;
}
/* The SMTP session may or may not have been allocated/setup at this
point! */
if(!dead_connection && smtpc->pp.conn)
- (void)smtp_quit(conn); /* ignore errors on QUIT */
+ if(!smtp_quit(conn))
+ (void)smtp_block_statemach(conn); /* ignore errors on QUIT */
/* Disconnect from the server */
Curl_pp_disconnect(&smtpc->pp);