From d6c99b6134f1eb90b3a8020c3538101df266e9b5 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Thu, 6 Sep 2012 00:13:04 +0530 Subject: 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 BUG: 850917 Reviewed-on: http://review.gluster.org/3829 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index aea27500d6a..4385f876498 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -851,7 +851,7 @@ out: } -static void +static int _delete_reconfig_opt (dict_t *this, char *key, data_t *value, void *data) { int32_t *is_force = 0; @@ -873,7 +873,7 @@ _delete_reconfig_opt (dict_t *this, char *key, data_t *value, void *data) key, value->data); dict_del (this, key); out: - return; + return 0; } static int @@ -3045,7 +3045,7 @@ glusterd_op_commit_perform (glusterd_op_t op, dict_t *dict, char **op_errstr, return ret; } -void +int _profile_volume_add_brick_rsp (dict_t *this, char *key, data_t *value, void *data) { @@ -3058,6 +3058,7 @@ _profile_volume_add_brick_rsp (dict_t *this, char *key, data_t *value, GF_ASSERT (new_value); snprintf (new_key, sizeof (new_key), "%d-%s", rsp_ctx->count, key); dict_set (rsp_ctx->dict, new_key, new_value); + return 0; } int @@ -3113,7 +3114,7 @@ glusterd_profile_volume_brick_rsp (void *pending_entry, //input-key: :-* //output-key: -* -void +int _heal_volume_add_shd_rsp (dict_t *this, char *key, data_t *value, void *data) { char new_key[256] = {0,}; @@ -3170,7 +3171,7 @@ _heal_volume_add_shd_rsp (dict_t *this, char *key, data_t *value, void *data) dict_set (rsp_ctx->dict, new_key, new_value); out: - return; + return 0; } int @@ -3206,7 +3207,7 @@ out: return ret; } -void +int _status_volume_add_brick_rsp (dict_t *this, char *key, data_t *value, void *data) { @@ -3219,7 +3220,7 @@ _status_volume_add_brick_rsp (dict_t *this, char *key, data_t *value, snprintf (new_key, sizeof (new_key), "brick%d.%s", rsp_ctx->count, key); dict_set (rsp_ctx->dict, new_key, new_value); - return; + return 0; } int -- cgit