summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-24 19:10:13 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-24 19:10:13 +0400
commit4536c2547b508cfa575218f6ebc147bf471ba465 (patch)
treea30664acb2269fdb468584fbd3df020607eb392c /src
parent9727678e705943da9e44130ce485b1bdab0a8e96 (diff)
downloadrspamd-4536c2547b508cfa575218f6ebc147bf471ba465.tar.gz
rspamd-4536c2547b508cfa575218f6ebc147bf471ba465.zip
* Fix states in smtp dialog
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,