From: Timo Sirainen Date: Tue, 17 Jan 2017 18:34:51 +0000 (+0200) Subject: doveadm direcor add: Fix checking number as hostname. X-Git-Tag: 2.3.0.rc1~2293 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=91879fbefda4e049ae37e6443a7806b0afddda86;p=thirdparty%2Fdovecot%2Fcore.git doveadm direcor add: Fix checking number as hostname. 521c0460fe705f32ea6899c8b1f101043fe0898c was completely broken. --- diff --git a/src/doveadm/doveadm-director.c b/src/doveadm/doveadm-director.c index 42c472759d..ca4990c060 100644 --- a/src/doveadm/doveadm-director.c +++ b/src/doveadm/doveadm-director.c @@ -469,10 +469,10 @@ cmd_director_add_or_update(struct doveadm_cmd_context *cctx, bool update) director_cmd_help(cctx->cmd); return; } - if (str_to_uint(host, &i) == 0) { + if (str_to_uint(ctx->host, &i) == 0) { /* host is a number. this would translate to an IP address, which is probably a mistake. */ - i_error("Invalid host '%s'", host); + i_error("Invalid host '%s'", ctx->host); director_cmd_help(cctx->cmd); return; }