Skip to content
Snippets Groups Projects
Commit 292a46a9 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

managesieve: Store command args to client command contexts for debugging purposes.

parent cc73a587
No related branches found
No related tags found
No related merge requests found
...@@ -444,6 +444,7 @@ bool client_read_args(struct client_command_context *cmd, unsigned int count, ...@@ -444,6 +444,7 @@ bool client_read_args(struct client_command_context *cmd, unsigned int count,
const struct managesieve_arg **args_r) const struct managesieve_arg **args_r)
{ {
const struct managesieve_arg *dummy_args_r = NULL; const struct managesieve_arg *dummy_args_r = NULL;
string_t *str;
int ret; int ret;
if (args_r == NULL) if (args_r == NULL)
...@@ -467,6 +468,10 @@ bool client_read_args(struct client_command_context *cmd, unsigned int count, ...@@ -467,6 +468,10 @@ bool client_read_args(struct client_command_context *cmd, unsigned int count,
} }
} }
str = t_str_new(256);
managesieve_write_args(str, *args_r);
cmd->args = p_strdup(cmd->pool, str_c(str));
/* all parameters read successfully */ /* all parameters read successfully */
return TRUE; return TRUE;
} else if (ret == -2) { } else if (ret == -2) {
......
...@@ -12,7 +12,12 @@ struct client_command_context { ...@@ -12,7 +12,12 @@ struct client_command_context {
struct client *client; struct client *client;
pool_t pool; pool_t pool;
/* Name of this command */
const char *name; const char *name;
/* Parameters for this command. These are generated from parsed
ManageSieve arguments, so they may not be exactly the same as how
client sent them. */
const char *args;
command_func_t *func; command_func_t *func;
void *context; void *context;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.