From 17bb78c13fcbb62a4446fec944e7d8ce39a42b0c Mon Sep 17 00:00:00 2001 From: Csaba Henk Date: Thu, 6 Sep 2012 22:44:15 +0200 Subject: glusterd: fix mountbroker option parsing routine Properly adjust it to the new dict API as of http://review.gluster.org/3829. Change-Id: I8f55d2b1d590b15000984f4862c52b3cd226cef8 BUG: 850917 Signed-off-by: Csaba Henk Reviewed-on: http://review.gluster.org/3914 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd.c') diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index f55b3ea51..c7b3b769d 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -664,15 +664,11 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data) gf_boolean_t ghadoop = _gf_false; char *pdesc = value->data; char *volname = NULL; - int *ret = data; int rv = 0; gf_mount_spec_t *mspec = NULL; char *user = NULL; char *volfile_server = NULL; - if (*ret == -1) - return -1; - label = strtail (key, "mountbroker."); /* check for presence of geo-rep/hadoop label */ @@ -688,7 +684,7 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data) } if (!label) - return -1; + return 0; mspec = GF_CALLOC (1, sizeof (*mspec), gf_gld_mt_mount_spec); if (!mspec) @@ -734,7 +730,6 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data) "adding %smount spec failed: label: %s desc: %s", georep ? GEOREP" " : "", label, pdesc); - *ret = -1; return -1; } @@ -987,8 +982,7 @@ init (xlator_t *this) INIT_LIST_HEAD (&conf->mount_specs); - ret = 0; - dict_foreach (this->options, _install_mount_spec, &ret); + ret = dict_foreach (this->options, _install_mount_spec, NULL); if (ret) goto out; ret = dict_get_str (this->options, "mountbroker-root", -- cgit