aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/smtp.c8
-rw-r--r--src/smtp.h1
2 files changed, 6 insertions, 3 deletions
diff --git a/src/smtp.c b/src/smtp.c
index f2c085aba..74d156bdd 100644
--- a/src/smtp.c
+++ b/src/smtp.c
@@ -196,7 +196,7 @@ read_smtp_command (struct smtp_session *session, f_str_t *line)
}
break;
case SMTP_COMMAND_QUIT:
- session->state = SMTP_STATE_END;
+ session->state = SMTP_STATE_QUIT;
break;
case SMTP_COMMAND_NOOP:
break;
@@ -445,7 +445,9 @@ smtp_read_socket (f_str_t * in, void *arg)
destroy_session (session->s);
return FALSE;
}
- smtp_write_socket (session);
+ if (! smtp_write_socket (session)) {
+ return FALSE;
+ }
}
break;
case SMTP_STATE_AFTER_DATA:
@@ -476,7 +478,7 @@ smtp_read_socket (f_str_t * in, void *arg)
break;
}
- if (session->state == SMTP_STATE_END) {
+ if (session->state == SMTP_STATE_QUIT) {
destroy_session (session->s);
return FALSE;
}
diff --git a/src/smtp.h b/src/smtp.h
index 11062543d..f8aaaeb84 100644
--- a/src/smtp.h
+++ b/src/smtp.h
@@ -48,6 +48,7 @@ enum rspamd_smtp_state {
SMTP_STATE_DATA,
SMTP_STATE_AFTER_DATA,
SMTP_STATE_END,
+ SMTP_STATE_QUIT,
SMTP_STATE_WAIT_UPSTREAM,
SMTP_STATE_IN_SENDFILE,
SMTP_STATE_ERROR,