mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:13:34 +03:00
parent
fc3261b284
commit
be92f0a2e4
8 changed files with 76 additions and 79 deletions
|
|
@ -485,7 +485,7 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
|
|||
const char *line, size_t len, int *resp)
|
||||
{
|
||||
struct smtp_conn *smtpc = Curl_conn_meta_get(conn, CURL_META_SMTP_CONN);
|
||||
bool result = FALSE;
|
||||
bool end = FALSE;
|
||||
(void)data;
|
||||
|
||||
DEBUGASSERT(smtpc);
|
||||
|
|
@ -504,7 +504,7 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
|
|||
char tmpline[6];
|
||||
curl_off_t code;
|
||||
const char *p = tmpline;
|
||||
result = TRUE;
|
||||
end = TRUE;
|
||||
memcpy(tmpline, line, (len == 5 ? 5 : 3));
|
||||
tmpline[len == 5 ? 5 : 3] = 0;
|
||||
if(curlx_str_number(&p, &code, len == 5 ? 99999 : 999))
|
||||
|
|
@ -518,11 +518,11 @@ static bool smtp_endofresp(struct Curl_easy *data, struct connectdata *conn,
|
|||
/* Do we have a multiline (continuation) response? */
|
||||
else if(line[3] == '-' &&
|
||||
(smtpc->state == SMTP_EHLO || smtpc->state == SMTP_COMMAND)) {
|
||||
result = TRUE;
|
||||
end = TRUE;
|
||||
*resp = 1; /* Internal response code */
|
||||
}
|
||||
|
||||
return result;
|
||||
return end;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue