summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 770443b9f..65203328a 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 ();