summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorMohammed Junaid Ahmed <junaid@gluster.com>2011-02-15 08:58:05 +0000
committerAnand V. Avati <avati@dev.gluster.com>2011-02-15 21:44:38 -0800
commita68b4ad416970ec0ca710f650f54b87c3b92428e (patch)
tree12eaa01e05409ab56dcf55223362ec0ba931f4e2 /xlators/mgmt
parent647d599f86f5577a94800607ff95b3e3636c4782 (diff)
syncdaemon: Check for ctx context in the glusterd_op_stage_gsyc_set().
Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
Diffstat (limited to 'xlators/mgmt')
-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 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 ();