summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-04-05 20:51:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-04-05 20:51:27 (GMT)
commitd1de790d2530b44d5671452f7db52fdee8e839f5 (patch)
treeb87e5cc6c501fa87e8466c93fa83828676cd82dc /src/H5G.c
parent88c72b4568f0eef918ab9ca17e1e7c5c0dc2435a (diff)
downloadhdf5-d1de790d2530b44d5671452f7db52fdee8e839f5.zip
hdf5-d1de790d2530b44d5671452f7db52fdee8e839f5.tar.gz
hdf5-d1de790d2530b44d5671452f7db52fdee8e839f5.tar.bz2
[svn-r2081] Fixed a problem in H5Giterate which was not updating the 'index' paramater for
certain return values from the callback.
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/H5G.c b/src/H5G.c
index edac93a..8ef6db5 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -316,12 +316,18 @@ H5Giterate(hid_t loc_id, const char *name, int *idx,
udata.op = op;
udata.op_data = op_data;
+ /* Set the number of entries looked at to zero */
+ udata.final_ent = 0;
+
/* Iterate over the group members */
if ((ret_value = H5B_iterate (H5G_fileof(udata.group), H5B_SNODE,
- udata.group->ent.cache.stab.btree_addr,
- &udata))<0) {
- HERROR (H5E_SYM, H5E_CANTINIT, "iteration operator failed");
+ udata.group->ent.cache.stab.btree_addr, &udata))<0) {
+ HERROR (H5E_SYM, H5E_CANTINIT, "iteration operator failed");
}
+
+ /* Set the index we stopped at */
+ *idx=udata.final_ent;
+
H5I_dec_ref (udata.group_id); /*also closes udata.group*/
FUNC_LEAVE (ret_value);
}