summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-07-11 21:59:20 +0530
committerAnand Avati <avati@redhat.com>2012-07-11 19:04:27 -0700
commit22aa93129319a667b004111a4385520a4ba30060 (patch)
tree356b92d47068f5530d3e30053bd334f91fb181ca /glusterfsd
parentea08bf886732d9680f2d6de19f3d68908a55143b (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')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 9984b42..be84167 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;
}