From: Timo Sirainen Date: Mon, 8 Mar 2021 14:44:31 +0000 (+0200) Subject: pop3: Move finishing istream to client_create_finish() X-Git-Tag: 2.3.16~138 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8fa48cb6d082992898328b22d42971f9dfbb25c4;p=thirdparty%2Fdovecot%2Fcore.git pop3: Move finishing istream to client_create_finish() --- diff --git a/src/pop3/pop3-client.c b/src/pop3/pop3-client.c index e5021d4d81..d06ced8dc1 100644 --- a/src/pop3/pop3-client.c +++ b/src/pop3/pop3-client.c @@ -403,13 +403,7 @@ struct client *client_create(int fd_in, int fd_out, o_stream_set_no_error_handling(client->output, TRUE); o_stream_set_flush_callback(client->output, client_output, client); - if (set->rawlog_dir[0] != '\0') { - (void)iostream_rawlog_create(set->rawlog_dir, &client->input, - &client->output); - } - p_array_init(&client->module_contexts, client->pool, 5); - client->io = io_add_istream(client->input, client_input, client); client->last_input = ioloop_time; client->to_idle = timeout_add(CLIENT_IDLE_TIMEOUT_MSECS, client_idle_timeout, client); @@ -442,6 +436,15 @@ struct client *client_create(int fd_in, int fd_out, return client; } +void client_create_finish(struct client *client) +{ + if (client->set->rawlog_dir[0] != '\0') { + (void)iostream_rawlog_create(client->set->rawlog_dir, + &client->input, &client->output); + } + client->io = io_add_istream(client->input, client_input, client); +} + int client_init_mailbox(struct client *client, const char **error_r) { enum mailbox_flags flags; diff --git a/src/pop3/pop3-client.h b/src/pop3/pop3-client.h index b6f666ee9e..5cb3f466eb 100644 --- a/src/pop3/pop3-client.h +++ b/src/pop3/pop3-client.h @@ -124,6 +124,7 @@ struct client *client_create(int fd_in, int fd_out, struct mail_user *user, struct mail_storage_service_user *service_user, const struct pop3_settings *set); +void client_create_finish(struct client *client); int client_init_mailbox(struct client *client, const char **error_r); void client_destroy(struct client *client, const char *reason) ATTR_NULL(2);