aboutsummaryrefslogtreecommitdiffstats
path: root/src/smtp_proxy.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-03 16:24:15 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2013-06-03 16:24:15 +0100
commit813f1f407f639c1f025298abae9fd0295a30d24c (patch)
tree97d62a546789698af9be1d4b6aac1183e4f9efd2 /src/smtp_proxy.c
parentf2c442c62951e1441493797268bb36f5da635ee4 (diff)
downloadrspamd-813f1f407f639c1f025298abae9fd0295a30d24c.tar.gz
rspamd-813f1f407f639c1f025298abae9fd0295a30d24c.zip
Fix some warnings that actually are dangerous.
Diffstat (limited to 'src/smtp_proxy.c')
-rw-r--r--src/smtp_proxy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/smtp_proxy.c b/src/smtp_proxy.c
index e7856898d..e90be31fe 100644
--- a/src/smtp_proxy.c
+++ b/src/smtp_proxy.c
@@ -217,7 +217,9 @@ free_smtp_proxy_session (gpointer arg)
if (session->state != SMTP_PROXY_STATE_PROXY && session->state != SMTP_PROXY_STATE_REJECT &&
session->state != SMTP_PROXY_STATE_REJECT_EMULATE) {
/* Send 521 fatal error */
- write (session->sock, fatal_smtp_error, sizeof (fatal_smtp_error));
+ if (write (session->sock, fatal_smtp_error, sizeof (fatal_smtp_error)) == -1) {
+ msg_err ("write error to client failed: %s", strerror (errno));
+ }
}
else if ((session->state == SMTP_PROXY_STATE_REJECT || session->state == SMTP_PROXY_STATE_REJECT_EMULATE) &&
session->from && session->rcpt && session->dnsbl_applied) {