diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-07-11 21:59:20 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-11 19:04:27 -0700 |
commit | 22aa93129319a667b004111a4385520a4ba30060 (patch) | |
tree | 356b92d47068f5530d3e30053bd334f91fb181ca /glusterfsd/src | |
parent | ea08bf886732d9680f2d6de19f3d68908a55143b (diff) |
rpc: add extra arguments to _callback's actor function
Need to differentiate the callback functions based on which
rpc-clnt the callback is received. without it, all callback
actor handling will be like global.
BUG: 839345
Change-Id: Ide024f5585eab3c5fe6c3b33250772fb6e8ad655
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/3656
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'glusterfsd/src')
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 9984b42bb19..be84167e4f0 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -57,10 +57,12 @@ int glusterfs_process_volfp (glusterfs_ctx_t *ctx, FILE *fp); int glusterfs_graph_unknown_options (glusterfs_graph_t *graph); int -mgmt_cbk_spec (void *data) +mgmt_cbk_spec (struct rpc_clnt *rpc, void *mydata, void *data) { glusterfs_ctx_t *ctx = NULL; + xlator_t *this = NULL; + this = mydata; ctx = glusterfs_ctx_get (); gf_log ("mgmt", GF_LOG_INFO, "Volume file changed"); @@ -70,10 +72,11 @@ mgmt_cbk_spec (void *data) int -mgmt_cbk_event (void *data) +mgmt_cbk_event (struct rpc_clnt *rpc, void *mydata, void *data) { return 0; } + struct iobuf * glusterfs_serialize_reply (rpcsvc_request_t *req, void *arg, struct iovec *outmsg, xdrproc_t xdrproc) @@ -1994,9 +1997,10 @@ glusterfs_mgmt_init (glusterfs_ctx_t *ctx) goto out; } - ret = rpcclnt_cbk_program_register (rpc, &mgmt_cbk_prog); + ret = rpcclnt_cbk_program_register (rpc, &mgmt_cbk_prog, THIS); if (ret) { - gf_log (THIS->name, GF_LOG_WARNING, "failed to register callback function"); + gf_log (THIS->name, GF_LOG_WARNING, + "failed to register callback function"); goto out; } |