1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

smtp.c: Small code tidy up following imap changes

This commit is contained in:
Steve Holme 2013-01-06 22:32:05 +00:00
parent 89a3086231
commit 70dcde78d0

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -22,6 +22,7 @@
* RFC3207 SMTP over TLS * RFC3207 SMTP over TLS
* RFC4954 SMTP Authentication * RFC4954 SMTP Authentication
* RFC2195 CRAM-MD5 authentication * RFC2195 CRAM-MD5 authentication
* RFC2222 Simple Authentication and Security Layer (SASL)
* RFC2831 DIGEST-MD5 authentication * RFC2831 DIGEST-MD5 authentication
* RFC4616 PLAIN authentication * RFC4616 PLAIN authentication
* *
@ -218,6 +219,7 @@ static int smtp_endofresp(struct pingpong *pp, int *resp)
if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2])) if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2]))
return FALSE; /* Nothing for us */ return FALSE; /* Nothing for us */
/* Extract the response code if necessary */
if((result = (line[3] == ' ')) != 0) if((result = (line[3] == ' ')) != 0)
*resp = curlx_sltosi(strtol(line, NULL, 10)); *resp = curlx_sltosi(strtol(line, NULL, 10));
@ -319,7 +321,7 @@ static CURLcode smtp_state_ehlo(struct connectdata *conn)
smtpc->authused = 0; /* Clear the authentication mechanism used smtpc->authused = 0; /* Clear the authentication mechanism used
for esmtp connections */ for esmtp connections */
/* send EHLO */ /* Send the EHLO command */
result = Curl_pp_sendf(&smtpc->pp, "EHLO %s", smtpc->domain); result = Curl_pp_sendf(&smtpc->pp, "EHLO %s", smtpc->domain);
if(result) if(result)
@ -338,7 +340,7 @@ static CURLcode smtp_state_helo(struct connectdata *conn)
smtpc->authused = 0; /* No authentication mechanism used in smtp smtpc->authused = 0; /* No authentication mechanism used in smtp
connections */ connections */
/* send HELO */ /* Send the HELO command */
result = Curl_pp_sendf(&smtpc->pp, "HELO %s", smtpc->domain); result = Curl_pp_sendf(&smtpc->pp, "HELO %s", smtpc->domain);
if(result) if(result)