From a68b4ad416970ec0ca710f650f54b87c3b92428e Mon Sep 17 00:00:00 2001 From: Mohammed Junaid Ahmed Date: Tue, 15 Feb 2011 08:58:05 +0000 Subject: syncdaemon: Check for ctx context in the glusterd_op_stage_gsyc_set(). Signed-off-by: Junaid Signed-off-by: Anand V. Avati BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 770443b9ff6..65203328aff 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -2051,12 +2051,20 @@ glusterd_op_stage_gsync_set (gd1_mgmt_stage_op_req *req, char **op_errstr) int type = 0; int status = 0; dict_t *dict = NULL; + dict_t *ctx = NULL; char *volname = NULL; char *master = NULL; char *slave = NULL; gf_boolean_t exists = _gf_false; glusterd_volinfo_t *volinfo = NULL; + ctx = glusterd_op_get_ctx (GD_OP_GSYNC_SET); + if (!ctx) { + gf_log ("gsync", GF_LOG_DEBUG, "gsync command doesn't " + "correspond to this glusterd"); + goto out; + } + GF_ASSERT (req); dict = dict_new (); -- cgit