Skip to content

Commit

Permalink
lib-smtp: server: Protect smpt_server_connection_start() from being c…
Browse files Browse the repository at this point in the history
…alled multiple times.
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 9, 2018
1 parent 67c8041 commit 2dc83a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib-smtp/smtp-server-connection.c
Expand Up @@ -1145,6 +1145,9 @@ void smtp_server_connection_login(struct smtp_server_connection *conn,

void smtp_server_connection_start(struct smtp_server_connection *conn)
{
i_assert(!conn->started);
conn->started = TRUE;

conn->raw_input = conn->conn.input;
conn->raw_output = conn->conn.output;

Expand Down
1 change: 1 addition & 0 deletions src/lib-smtp/smtp-server-private.h
Expand Up @@ -149,6 +149,7 @@ struct smtp_server_connection {

struct smtp_server_stats stats;

bool started:1;
bool ssl_start:1;
bool ssl_secured:1;
bool authenticated:1;
Expand Down

0 comments on commit 2dc83a5

Please sign in to comment.