summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2014-10-31 06:52:39 +0530
committerKaushal M <kaushal@redhat.com>2014-11-10 22:43:31 -0800
commitb3ce1bfeaab08cdf51cccd60d6d7047c692f73a9 (patch)
treef346da849ebc6b49e20cab88c2af43117f87c9c6 /cli
parent60f12e0eaf11a42f3f5ee8978ba540bbb6c8aadb (diff)
cli: for rpc timeout throw a time out message
Change-Id: I9660df1c3b2707583bd95806011b650cd1a2df1b BUG: 1161037 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/9017 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd.c10
1 files changed, 7 insertions, 3 deletions
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;
}