diff options
| author | Anand Avati <avati@redhat.com> | 2012-07-25 23:24:11 -0700 | 
|---|---|---|
| committer | Anand Avati <avati@redhat.com> | 2012-08-02 13:24:36 -0700 | 
| commit | 1b42c864d64b0b9af06d251797fba70334d84f67 (patch) | |
| tree | ad7960b4de4830221b301c854eb6c691b9ed7bc6 /api | |
| parent | a3072499338b2d86f5cc3ac83f49c5249dc97778 (diff) | |
gfapi: let glfs_init() return on non-RPC errors
Change-Id: Ic3a15044434926127b8de273b1033b8ad452290c
BUG: 839950
Signed-off-by: Anand Avati <avati@redhat.com>
Reviewed-on: http://review.gluster.com/3732
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'api')
| -rw-r--r-- | api/src/glfs-mgmt.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/api/src/glfs-mgmt.c b/api/src/glfs-mgmt.c index 8283bd3f..2ead9386 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)  | 
