Loading lib/smtp.c +4 −5 Original line number Diff line number Diff line Loading @@ -213,19 +213,18 @@ static int smtp_endofresp(struct pingpong *pp, int *resp) size_t len = strlen(pp->linestart_resp); struct connectdata *conn = pp->conn; struct smtp_conn *smtpc = &conn->proto.smtpc; int result = FALSE; size_t wordlen; if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2])) return FALSE; /* Nothing for us */ /* Do we have a command response? */ if(line[3] == ' ') { if((result = (line[3] == ' ')) != 0) *resp = curlx_sltosi(strtol(line, NULL, 10)); return TRUE; } /* Are we processing EHLO command data? */ if(smtpc->state == SMTP_EHLO) { if(smtpc->state == SMTP_EHLO && (!result || (result && *resp == 250))) { line += 4; len -= 4; Loading Loading @@ -281,7 +280,7 @@ static int smtp_endofresp(struct pingpong *pp, int *resp) } } return FALSE; return result; } /* This is the ONLY way to change SMTP state! */ Loading Loading
lib/smtp.c +4 −5 Original line number Diff line number Diff line Loading @@ -213,19 +213,18 @@ static int smtp_endofresp(struct pingpong *pp, int *resp) size_t len = strlen(pp->linestart_resp); struct connectdata *conn = pp->conn; struct smtp_conn *smtpc = &conn->proto.smtpc; int result = FALSE; size_t wordlen; if(len < 4 || !ISDIGIT(line[0]) || !ISDIGIT(line[1]) || !ISDIGIT(line[2])) return FALSE; /* Nothing for us */ /* Do we have a command response? */ if(line[3] == ' ') { if((result = (line[3] == ' ')) != 0) *resp = curlx_sltosi(strtol(line, NULL, 10)); return TRUE; } /* Are we processing EHLO command data? */ if(smtpc->state == SMTP_EHLO) { if(smtpc->state == SMTP_EHLO && (!result || (result && *resp == 250))) { line += 4; len -= 4; Loading Loading @@ -281,7 +280,7 @@ static int smtp_endofresp(struct pingpong *pp, int *resp) } } return FALSE; return result; } /* This is the ONLY way to change SMTP state! */ Loading