diff options
author | Pranith K <pranithk@gluster.com> | 2010-10-05 07:34:45 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-05 06:21:57 -0700 |
commit | 4c7ca7ec15760681703450dc9279a8c3cf8b98c0 (patch) | |
tree | ad3ae14f179fa2309ac8fddcfbd7b13b4622c4af /libglusterfs/src/dict.c | |
parent | 6b74f3ec7b6e0fed2e253df456b067fc27049117 (diff) |
mgmt/glusterd: send volume options to friendv3.1.0qa41
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1816 (send volume options in friend add)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1816
Diffstat (limited to 'libglusterfs/src/dict.c')
-rw-r--r-- | libglusterfs/src/dict.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c index 0b0d777a047..454a7a67a84 100644 --- a/libglusterfs/src/dict.c +++ b/libglusterfs/src/dict.c @@ -1235,18 +1235,20 @@ dict_foreach (dict_t *dict, void *data), void *data) { - if (!data) { - gf_log ("dict", GF_LOG_CRITICAL, - "@data=%p", data); - return; - } + if (!data || !dict) { + gf_log_callingfn ("dict", GF_LOG_CRITICAL, + "@data=%p, @dict=%p", data, dict); + return; + } - data_pair_t *pairs = dict->members_list; + data_pair_t *pairs = dict->members_list; + data_pair_t *next = NULL; - while (pairs) { - fn (dict, pairs->key, pairs->value, data); - pairs = pairs->next; - } + while (pairs) { + next = pairs->next; + fn (dict, pairs->key, pairs->value, data); + pairs = next; + } } |