From 744de5b52ad1ade82205b27aa9421f5ac88f84cf Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Mon, 29 Oct 2018 17:14:00 +0100 Subject: [PATCH] BUG/MINOR: cli: forward the whole command on master CLI A bug occurs when the CLI proxy of the master received a command which is prefixed by some spaces but without a routing prefix (@). In this case the pcli_parse_request() was returning a wrong number of data to forward. The response analyzer was called twice and the prompt displayed twice. --- src/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.c b/src/cli.c index e1b527465..510e1e349 100644 --- a/src/cli.c +++ b/src/cli.c @@ -1766,7 +1766,7 @@ int pcli_parse_request(struct channel *req, int *target_pid) if (*pfx_b != '@') { /* there is no prefix */ pfx_b = NULL; - cmd_b = ptr; + cmd_b = input; /* if no prefix we don't trim anything */ state = PCLI_REQ_CMD; continue; }