diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-12-19 17:07:50 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2014-12-23 04:22:22 -0800 |
commit | f3df93783d8c817722e086b14b97fa6bc9d0fce8 (patch) | |
tree | 22083656d1dfa6884c1a45977e3f085aa3727c5f /xlators/mgmt/glusterd/src | |
parent | 9a6ea92df1007cc6f402ff7cc560e3206fa42e62 (diff) |
glusterd: fix unix domain notify fn
... and unlink the 'right' socket file
Change-Id: Id12ee8c622914555b7933104e13b43b3b31b5d19
BUG: 1176770
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.org/9315
Reviewed-by: Kaushal M <kaushal@redhat.com>
Tested-by: Kaushal M <kaushal@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index d81ee435840..d915e62143c 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1300,6 +1300,8 @@ glusterd_stop_uds_listener (xlator_t *this) glusterd_conf_t *conf = NULL; rpcsvc_listener_t *listener = NULL; rpcsvc_listener_t *next = NULL; + data_t *sock_data = NULL; + char sockfile[UNIX_PATH_MAX+1] = {0,}; GF_ASSERT (this); conf = this->private; @@ -1312,10 +1314,17 @@ glusterd_stop_uds_listener (xlator_t *this) rpcsvc_listener_destroy (listener); } - (void) rpcsvc_unregister_notify (conf->uds_rpc, glusterd_rpcsvc_notify, + (void) rpcsvc_unregister_notify (conf->uds_rpc, + glusterd_uds_rpcsvc_notify, this); - unlink (DEFAULT_GLUSTERD_SOCKFILE); + sock_data = dict_get (this->options, "glusterd-sockfile"); + if (!sock_data) { + strncpy (sockfile, DEFAULT_GLUSTERD_SOCKFILE, PATH_MAX); + } else { + strncpy (sockfile, sock_data->data, PATH_MAX); + } + unlink (sockfile); GF_FREE (conf->uds_rpc); conf->uds_rpc = NULL; |