From b3ce1bfeaab08cdf51cccd60d6d7047c692f73a9 Mon Sep 17 00:00:00 2001 From: Atin Mukherjee Date: Fri, 31 Oct 2014 06:52:39 +0530 Subject: cli: for rpc timeout throw a time out message Change-Id: I9660df1c3b2707583bd95806011b650cd1a2df1b BUG: 1161037 Signed-off-by: Atin Mukherjee Reviewed-on: http://review.gluster.org/9017 Tested-by: Gluster Build System Reviewed-by: Kaushal M --- cli/src/cli-cmd.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'cli') diff --git a/cli/src/cli-cmd.c b/cli/src/cli-cmd.c index ec2d58ae91c..b415569be28 100644 --- a/cli/src/cli-cmd.c +++ b/cli/src/cli-cmd.c @@ -290,11 +290,15 @@ cli_cmd_await_response (unsigned time) &ts); } + if (!cmd_done) { + if (ret == ETIMEDOUT) + cli_out ("Error : Request timed out"); + else + cli_out ("Error : Command returned with error code:%d", + ret); + } cmd_done = 0; - if (ret) - return ret; - return cli_op_ret; } -- cgit