mirror of
https://github.com/curl/curl.git
synced 2025-09-29 07:26:48 +03:00
SMTP: debug output for no known auth mechanisms supported
... and some minor source code whitespace edits
This commit is contained in:
parent
6a43ffa0d5
commit
450c994a49
10
lib/smtp.c
10
lib/smtp.c
|
@ -237,7 +237,8 @@ static int smtp_endofresp(struct pingpong *pp, int *resp)
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
while (len &&
|
while (len &&
|
||||||
(*line == ' ' || *line == '\t' || *line == '\r' || *line == '\n')) {
|
(*line == ' ' || *line == '\t' ||
|
||||||
|
*line == '\r' || *line == '\n')) {
|
||||||
line++;
|
line++;
|
||||||
len--;
|
len--;
|
||||||
}
|
}
|
||||||
|
@ -246,7 +247,8 @@ static int smtp_endofresp(struct pingpong *pp, int *resp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for (wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
|
for (wordlen = 0; wordlen < len && line[wordlen] != ' ' &&
|
||||||
line[wordlen] != '\t' && line[wordlen] != '\r' && line[wordlen] != '\n';)
|
line[wordlen] != '\t' && line[wordlen] != '\r' &&
|
||||||
|
line[wordlen] != '\n';)
|
||||||
wordlen++;
|
wordlen++;
|
||||||
|
|
||||||
if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
|
if(wordlen == 5 && !memcmp(line, "LOGIN", 5))
|
||||||
|
@ -409,8 +411,10 @@ static CURLcode smtp_authenticate(struct connectdata *conn)
|
||||||
state2 = SMTP_AUTHPASSWD;
|
state2 = SMTP_AUTHPASSWD;
|
||||||
l = smtp_auth_login_user(conn, &initresp);
|
l = smtp_auth_login_user(conn, &initresp);
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
|
infof(conn->data, "No known auth mechanisms supported!\n");
|
||||||
result = CURLE_LOGIN_DENIED; /* Other mechanisms not supported. */
|
result = CURLE_LOGIN_DENIED; /* Other mechanisms not supported. */
|
||||||
|
}
|
||||||
|
|
||||||
if(!result) {
|
if(!result) {
|
||||||
if(!l)
|
if(!l)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user