From c9d85b6268523f1872dde05f271e16afd0358939 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Sat, 16 Apr 2011 04:13:35 +0000 Subject: cli: check for connectivity before doing mount in quota limit list. Signed-off-by: Amar Tumballi Signed-off-by: Anand Avati BUG: 2732 (Quota: the local mount on server fails while using quota list command) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2732 --- cli/src/cli-rpc-ops.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 32fc2e0ca9f..b2e919132e3 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -45,6 +45,7 @@ extern rpc_clnt_prog_t *cli_rpc_prog; extern int cli_op_ret; +extern int connected; char *cli_volume_type[] = {"Distribute", "Stripe", @@ -1322,6 +1323,9 @@ print_limit_list (char *volname, char *limit_list) GF_VALIDATE_OR_GOTO ("cli", volname, out); GF_VALIDATE_OR_GOTO ("cli", limit_list, out); + if (!connected) + goto out; + if (mkdtemp (mountdir) == NULL) { gf_log ("cli", GF_LOG_WARNING, "failed to create a temporary " "mount directory"); -- cgit