summaryrefslogtreecommitdiffstats
path: root/cli/src
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-04-16 04:13:35 +0000
committerAnand Avati <avati@gluster.com>2011-04-16 10:51:57 -0700
commitc9d85b6268523f1872dde05f271e16afd0358939 (patch)
treeb660b361da3fff211760e9bb200a8fe632b861a2 /cli/src
parent87e4d4814458c57a3337e7c610f6ead76d0cb28f (diff)
cli: check for connectivity before doing mount
in quota limit list. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> 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
Diffstat (limited to 'cli/src')
-rw-r--r--cli/src/cli-rpc-ops.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c
index 32fc2e0ca..b2e919132 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");