From 6bf5392b674e40bf4add99ccfb01ff539c8386b0 Mon Sep 17 00:00:00 2001 From: vmallika Date: Tue, 5 Jan 2016 17:50:09 +0530 Subject: glusterd: register rpc notification for unix sockets This is a backport of http://review.gluster.org/#/c/13174/ Previously only CLI was using unix socket to connect to glusterd, and there was no need to register rpc callback notifications. Now auxiliary mount process is started with unix socket option. So we need to register rpc notifications for unix sockets as well. Change-Id: Ie52fb97195d78e1fde43ee966174bc4274f68f7e BUG: 1296024 Signed-off-by: vmallika Reviewed-on: http://review.gluster.org/13181 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'xlators/mgmt') diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 73e847a0470..8e13b41f24b 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1033,17 +1033,6 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data) } -int -glusterd_uds_rpcsvc_notify (rpcsvc_t *rpc, void *xl, rpcsvc_event_t event, - void *data) -{ - /* glusterd_rpcsvc_notify() does stuff that calls coming in from the - * unix domain socket don't need. This is just an empty function to be - * used for the uds listener. This will be used later if required. - */ - return 0; -} - /* The glusterd unix domain socket listener only listens for cli */ rpcsvc_t * glusterd_init_uds_listener (xlator_t *this) @@ -1079,8 +1068,7 @@ glusterd_init_uds_listener (xlator_t *this) goto out; } - ret = rpcsvc_register_notify (rpc, glusterd_uds_rpcsvc_notify, - this); + ret = rpcsvc_register_notify (rpc, glusterd_rpcsvc_notify, this); if (ret) { gf_msg_debug (this->name, 0, "Failed to register notify function"); @@ -1144,8 +1132,7 @@ glusterd_stop_uds_listener (xlator_t *this) } (void) rpcsvc_unregister_notify (conf->uds_rpc, - glusterd_uds_rpcsvc_notify, - this); + glusterd_rpcsvc_notify, this); sock_data = dict_get (this->options, "glusterd-sockfile"); if (!sock_data) { -- cgit