From 2668e9f1892dbe898e41e3a14701258d78cb8f46 Mon Sep 17 00:00:00 2001 From: Sanju Rakonde Date: Tue, 10 Mar 2020 15:05:08 +0530 Subject: cli: display the error while probing the localhost With bc6e206c6, we regressed in displaying the error message when a user tries to probe localhost. With this change, we display "probe on localhost not needed" message to the user. credits: Sachin Prabhu fixes: bz#1810042 Change-Id: Ibf82b5a658c371c08290a0b4f655e5ac5f436c06 Signed-off-by: Sanju Rakonde --- cli/src/cli-rpc-ops.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/src') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 0f57d94b506..3205f2895b1 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -158,9 +158,9 @@ gf_cli_probe_cbk(struct rpc_req *req, struct iovec *iov, int count, gf_log("cli", GF_LOG_INFO, "Received resp to probe"); - if (rsp.op_ret) { - if (rsp.op_errstr && rsp.op_errstr[0] != '\0') { - snprintf(msg, sizeof(msg), "%s", rsp.op_errstr); + if (rsp.op_errstr && rsp.op_errstr[0] != '\0') { + snprintf(msg, sizeof(msg), "%s", rsp.op_errstr); + if (rsp.op_ret) { gf_log("cli", GF_LOG_ERROR, "%s", msg); } } -- cgit