summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-09-06 00:13:04 +0530
committerAnand Avati <avati@redhat.com>2012-09-06 00:34:15 -0700
commitd6c99b6134f1eb90b3a8020c3538101df266e9b5 (patch)
treea5ec27bcf3136ddfda5ce5f21917bea50ad3be58 /xlators/mgmt/glusterd/src/glusterd.c
parent54b71368ef290bc579f113e683a82b09893fb50a (diff)
libglusterfs/dict: make 'dict_t' a opaque object
* ie, don't dereference dict_t pointer, instead use APIs everywhere * other than dict_t only 'data_t' should be the valid export from dict.h * added 'dict_foreach_fnmatch()' API * changed dict_lookup() to use data_t, instead of data_pair_t Change-Id: I400bb0dd55519a7c5d2a107e67c8e7a7207228dc Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 850917 Reviewed-on: http://review.gluster.org/3829 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 17a2063948f..f55b3ea51f2 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -655,7 +655,7 @@ check_prepare_mountbroker_root (char *mountbroker_root)
return ret;
}
-static void
+static int
_install_mount_spec (dict_t *opts, char *key, data_t *value, void *data)
{
glusterd_conf_t *priv = THIS->private;
@@ -671,7 +671,7 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data)
char *volfile_server = NULL;
if (*ret == -1)
- return;
+ return -1;
label = strtail (key, "mountbroker.");
@@ -688,7 +688,7 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data)
}
if (!label)
- return;
+ return -1;
mspec = GF_CALLOC (1, sizeof (*mspec), gf_gld_mt_mount_spec);
if (!mspec)
@@ -727,7 +727,7 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data)
list_add_tail (&mspec->speclist, &priv->mount_specs);
- return;
+ return 0;
err:
gf_log ("", GF_LOG_ERROR,
@@ -735,6 +735,7 @@ _install_mount_spec (dict_t *opts, char *key, data_t *value, void *data)
georep ? GEOREP" " : "", label, pdesc);
*ret = -1;
+ return -1;
}
/*