smtp.c: Changed the curl error code for EHLO and HELO responses
Changed the returned curl error codes for EHLO and HELO responses from CURLE_LOGIN_DENIED to CURLE_REMOTE_ACCESS_DENIED as a negative response from these commands represents no service as opposed to a login error.
This commit is contained in:
parent
79afcbefb4
commit
e25590a2b3
10
lib/smtp.c
10
lib/smtp.c
@ -330,6 +330,7 @@ static CURLcode smtp_state_ehlo(struct connectdata *conn)
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
state(conn, SMTP_EHLO);
|
state(conn, SMTP_EHLO);
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,6 +349,7 @@ static CURLcode smtp_state_helo(struct connectdata *conn)
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
state(conn, SMTP_HELO);
|
state(conn, SMTP_HELO);
|
||||||
|
|
||||||
return CURLE_OK;
|
return CURLE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -561,8 +563,8 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn,
|
|||||||
!conn->bits.user_passwd)
|
!conn->bits.user_passwd)
|
||||||
result = smtp_state_helo(conn);
|
result = smtp_state_helo(conn);
|
||||||
else {
|
else {
|
||||||
failf(data, "Access denied: %d", smtpcode);
|
failf(data, "Remote access denied: %d", smtpcode);
|
||||||
result = CURLE_LOGIN_DENIED;
|
result = CURLE_REMOTE_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
|
else if(data->set.use_ssl && !conn->ssl[FIRSTSOCKET].use) {
|
||||||
@ -588,8 +590,8 @@ static CURLcode smtp_state_helo_resp(struct connectdata *conn,
|
|||||||
(void)instate; /* no use for this yet */
|
(void)instate; /* no use for this yet */
|
||||||
|
|
||||||
if(smtpcode/100 != 2) {
|
if(smtpcode/100 != 2) {
|
||||||
failf(data, "Access denied: %d", smtpcode);
|
failf(data, "Remote access denied: %d", smtpcode);
|
||||||
result = CURLE_LOGIN_DENIED;
|
result = CURLE_REMOTE_ACCESS_DENIED;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/* end the connect phase */
|
/* end the connect phase */
|
||||||
|
Loading…
Reference in New Issue
Block a user