diff options
author | Amar Tumballi <amarts@redhat.com> | 2012-09-06 00:13:04 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-09-06 00:34:15 -0700 |
commit | d6c99b6134f1eb90b3a8020c3538101df266e9b5 (patch) | |
tree | a5ec27bcf3136ddfda5ce5f21917bea50ad3be58 /xlators/mgmt/glusterd/src/glusterd-utils.c | |
parent | 54b71368ef290bc579f113e683a82b09893fb50a (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-utils.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 51478fb1246..3a48a41d76c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -1615,7 +1615,7 @@ out: return ret; } -void +int _add_volinfo_dict_to_prdict (dict_t *this, char *key, data_t *value, void *data) { glusterd_voldict_ctx_t *ctx = NULL; @@ -1637,7 +1637,7 @@ _add_volinfo_dict_to_prdict (dict_t *this, char *key, data_t *value, void *data) ctx->val_name, ctx->count, value->data); ctx->opt_count++; - return; + return ret; } int32_t @@ -3495,7 +3495,7 @@ glusterd_restart_bricks (glusterd_conf_t *conf) return ret; } -void +int _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data) { char *slave = NULL; @@ -3509,11 +3509,13 @@ _local_gsyncd_start (dict_t *this, char *key, data_t *value, void *data) if (slave) slave ++; else - return; + return 0; uuid_len = (slave - value->data - 1); strncpy (uuid_str, (char*)value->data, uuid_len); glusterd_start_gsync (volinfo, slave, uuid_str, NULL); + + return 0; } int |