From: sergey.kitov Date: Thu, 20 Apr 2023 07:41:37 +0000 (+0300) Subject: imap: Add 'internal' flag to struct client_command_context. X-Git-Tag: 2.4.0~2782 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=814f1e84def7d4f16ad5a306b05eb743e5815eef;p=thirdparty%2Fdovecot%2Fcore.git imap: Add 'internal' flag to struct client_command_context. imap_command_finished event is not issued when the flag is set. --- diff --git a/src/imap/imap-client.c b/src/imap/imap-client.c index 5895f2ed83..6d8dfce585 100644 --- a/src/imap/imap-client.c +++ b/src/imap/imap-client.c @@ -1017,7 +1017,8 @@ void client_command_free(struct client_command_context **_cmd) if (client->mailbox_change_lock == cmd) client->mailbox_change_lock = NULL; - event_set_name(cmd->event, "imap_command_finished"); + if (!cmd->internal) + event_set_name(cmd->event, "imap_command_finished"); if (cmd->tagline_reply != NULL) { event_add_str(cmd->event, "tagged_reply_state", t_strcut(cmd->tagline_reply, ' ')); diff --git a/src/imap/imap-client.h b/src/imap/imap-client.h index d3d4a93233..ad1e6f5c5d 100644 --- a/src/imap/imap-client.h +++ b/src/imap/imap-client.h @@ -120,6 +120,7 @@ struct client_command_context { bool temp_executed:1; /* temporary execution state tracking */ bool tagline_sent:1; bool executing:1; + bool internal:1; }; struct imap_client_vfuncs {