diff options
author | Csaba Henk <csaba@redhat.com> | 2012-09-06 22:44:15 +0200 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-09-06 16:36:59 -0700 |
commit | 17bb78c13fcbb62a4446fec944e7d8ce39a42b0c (patch) | |
tree | 696fbb134d3072e0c955310ce8ab7eaee4058c2d /xlators/mgmt | |
parent | 8b6fe1072561c64f190db6f001f235bf9a30c138 (diff) |
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 <csaba@redhat.com>
Reviewed-on: http://review.gluster.org/3914
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index f55b3ea51f2..c7b3b769dcf 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", |