From 710c52d23a2e7839a156c123167c6e13c8207f76 Mon Sep 17 00:00:00 2001 From: JulesWang Date: Fri, 25 Jan 2013 11:49:18 +0800 Subject: glusterd: make 'glusterd_is_local_addr' return bool Change-Id: Id3bd0bfc4802c166f7a32b0cc6a726aeb5617b5d BUG: 890618 Signed-off-by: JulesWang Reviewed-on: http://review.gluster.org/4427 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-handler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-handler.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index bfec8d469..ec717ac2e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -736,9 +736,10 @@ glusterd_handle_cli_probe (rpcsvc_request_t *req) gf_log ("glusterd", GF_LOG_INFO, "Received CLI probe req %s %d", cli_req.hostname, cli_req.port); - if (!(ret = glusterd_is_local_addr(cli_req.hostname))) { + if (glusterd_is_local_addr(cli_req.hostname)) { glusterd_xfer_cli_probe_resp (req, 0, GF_PROBE_LOCALHOST, NULL, cli_req.hostname, cli_req.port); + ret = 0; goto out; } @@ -1440,7 +1441,7 @@ glusterd_handle_sync_volume (rpcsvc_request_t *req) gf_log (this->name, GF_LOG_INFO, "Received volume sync req " "for volume %s", (flags & GF_CLI_SYNC_ALL) ? "all" : volname); - if (!glusterd_is_local_addr (hostname)) { + if (glusterd_is_local_addr (hostname)) { ret = -1; snprintf (msg, sizeof (msg), "sync from localhost" " not allowed"); -- cgit