From 1b42c864d64b0b9af06d251797fba70334d84f67 Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Wed, 25 Jul 2012 23:24:11 -0700 Subject: gfapi: let glfs_init() return on non-RPC errors Change-Id: Ic3a15044434926127b8de273b1033b8ad452290c BUG: 839950 Signed-off-by: Anand Avati Reviewed-on: http://review.gluster.com/3732 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi --- api/src/glfs-mgmt.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 8283bd3fe57..2ead93863bc 100644 --- a/api/src/glfs-mgmt.c +++ b/api/src/glfs-mgmt.c @@ -392,6 +392,7 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, int ret = 0; ssize_t size = 0; FILE *tmpfp = NULL; + int need_retry = 0; struct glfs *fs = NULL; frame = myframe; @@ -400,6 +401,7 @@ mgmt_getspec_cbk (struct rpc_req *req, struct iovec *iov, int count, if (-1 == req->rpc_status) { ret = -1; + need_retry = 1; goto out; } @@ -482,6 +484,8 @@ out: gf_log ("glfs-mgmt", GF_LOG_ERROR, "failed to fetch volume file (key:%s)", ctx->cmd_args.volfile_id); + if (!need_retry) + glfs_init_done (fs, -1); } if (tmpfp) -- cgit