From: Timo Sirainen Date: Mon, 8 Mar 2021 14:33:50 +0000 (+0200) Subject: imap: Move iostream-rawlog creation to client_create_finish() X-Git-Tag: 2.3.16~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16328738d35370685387ec51d20657265855e770;p=thirdparty%2Fdovecot%2Fcore.git imap: Move iostream-rawlog creation to client_create_finish() This allows the caller to modify the istream before rawlog. --- diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 0fafd71060..be7a4eb864 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -156,11 +156,6 @@ struct client *client_create(int fd_in, int fd_out, client->notify_flag_changes = TRUE; p_array_init(&client->enabled_features, client->pool, 8); - if (set->rawlog_dir[0] != '\0') { - (void)iostream_rawlog_create(set->rawlog_dir, &client->input, - &client->output); - } - client->capability_string = str_new(client->pool, sizeof(CAPABILITY_STRING)+64); @@ -229,6 +224,11 @@ int client_create_finish(struct client *client, const char **error_r) return -1; mail_namespaces_set_storage_callbacks(client->user->namespaces, &mail_storage_callbacks, 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); client->v.init(client);