aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2012-02-24 14:36:53 +0000
committerunknown <Steve Holme@.digital-frog.com>2012-03-10 22:03:42 +0000
commite25590a2b38e1a2a653c3905cce67545da66c8c3 (patch)
tree02c169729ca52e21ef1f3f4647b3dbb59e696035 /lib
parent79afcbefb45d17ecdab79c21a132a871501e489e (diff)
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.
Diffstat (limited to 'lib')
-rw-r--r--lib/smtp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/smtp.c b/lib/smtp.c
index a4f14ab1f..4c3c512a8 100644
--- a/lib/smtp.c
+++ b/lib/smtp.c
@@ -330,6 +330,7 @@ static CURLcode smtp_state_ehlo(struct connectdata *conn)
return result;
state(conn, SMTP_EHLO);
+
return CURLE_OK;
}
@@ -348,6 +349,7 @@ static CURLcode smtp_state_helo(struct connectdata *conn)
return result;
state(conn, SMTP_HELO);
+
return CURLE_OK;
}
@@ -561,8 +563,8 @@ static CURLcode smtp_state_ehlo_resp(struct connectdata *conn,
!conn->bits.user_passwd)
result = smtp_state_helo(conn);
else {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
+ failf(data, "Remote access denied: %d", smtpcode);
+ result = CURLE_REMOTE_ACCESS_DENIED;
}
}
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 */
if(smtpcode/100 != 2) {
- failf(data, "Access denied: %d", smtpcode);
- result = CURLE_LOGIN_DENIED;
+ failf(data, "Remote access denied: %d", smtpcode);
+ result = CURLE_REMOTE_ACCESS_DENIED;
}
else {
/* end the connect phase */