From: Stephan Bosch Date: Tue, 26 Aug 2025 23:32:46 +0000 (+0200) Subject: imap: imap-commands-util - Change client_find_namespace_full() parameter to command... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f068e7bf16ab517b7a1d65d2bba7b222db9537d;p=thirdparty%2Fdovecot%2Fcore.git imap: imap-commands-util - Change client_find_namespace_full() parameter to command context --- diff --git a/src/imap/cmd-select.c b/src/imap/cmd-select.c index 418eb44156..3e9baae399 100644 --- a/src/imap/cmd-select.c +++ b/src/imap/cmd-select.c @@ -388,7 +388,7 @@ bool cmd_select_full(struct client_command_context *cmd, bool readonly) ctx = p_new(cmd->pool, struct imap_select_context, 1); ctx->cmd = cmd; - ctx->ns = client_find_namespace_full(cmd->client, &mailbox, &client_error); + ctx->ns = client_find_namespace_full(cmd, &mailbox, &client_error); if (ctx->ns == NULL) { /* send * OK [CLOSED] before the tagged reply */ close_selected_mailbox(client); diff --git a/src/imap/imap-commands-util.c b/src/imap/imap-commands-util.c index acac835568..4647809cc4 100644 --- a/src/imap/imap-commands-util.c +++ b/src/imap/imap-commands-util.c @@ -15,9 +15,10 @@ #include "imap-commands-util.h" struct mail_namespace * -client_find_namespace_full(struct client *client, +client_find_namespace_full(struct client_command_context *cmd, const char **mailbox, const char **client_error_r) { + struct client *client = cmd->client; struct mail_namespace *namespaces = client->user->namespaces; struct mail_namespace *ns; string_t *utf8_name; @@ -58,7 +59,7 @@ client_find_namespace(struct client_command_context *cmd, const char **mailbox) struct mail_namespace *ns; const char *client_error; - ns = client_find_namespace_full(cmd->client, mailbox, &client_error); + ns = client_find_namespace_full(cmd, mailbox, &client_error); if (ns == NULL) client_send_tagline(cmd, client_error); return ns; diff --git a/src/imap/imap-commands-util.h b/src/imap/imap-commands-util.h index e297cc51c4..c8762a0ef9 100644 --- a/src/imap/imap-commands-util.h +++ b/src/imap/imap-commands-util.h @@ -14,7 +14,7 @@ struct mailbox_keywords; struct mail_namespace * client_find_namespace(struct client_command_context *cmd, const char **mailbox); struct mail_namespace * -client_find_namespace_full(struct client *client, +client_find_namespace_full(struct client_command_context *cmd, const char **mailbox, const char **client_error_r); /* Returns TRUE if mailbox is selected. If not, sends "No mailbox selected"