Skip to content

Commit

Permalink
doveadm-director: Show tag field from response
Browse files Browse the repository at this point in the history
Fix off-by-one in doveadm director dump
  • Loading branch information
cmouse authored and sirainen committed Dec 15, 2016
1 parent 891b344 commit 98fdeba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/doveadm/doveadm-director.c
Expand Up @@ -751,11 +751,12 @@ static void cmd_director_dump(struct doveadm_cmd_context *cctx)
args = t_strsplit_tab(line);
if (str_array_length(args) >= 2) {
const char *host = args[0];
const char *tag = args[3];
/* this is guaranteed to be at least NULL */
if (args[2] != NULL &&
*args[2] != '\0')
if (tag != NULL &&
*tag != '\0')
host = t_strdup_printf("%s@%s", host,
args[2]);
tag);
doveadm_print("add");
doveadm_print(ctx->socket_path);
doveadm_print(host);
Expand Down

0 comments on commit 98fdeba

Please sign in to comment.