summaryrefslogtreecommitdiffstats
path: root/src/H5G.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-08-10 20:28:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-08-10 20:28:32 (GMT)
commit0e1b41d0fd1521784128e8637b5afa8371d2779d (patch)
tree8c17410110f52e6c5b77e49d41a8c1af00a8e3da /src/H5G.c
parenta8fbde5d18ea0b8e0567649571e527e9f04ab5c7 (diff)
downloadhdf5-0e1b41d0fd1521784128e8637b5afa8371d2779d.zip
hdf5-0e1b41d0fd1521784128e8637b5afa8371d2779d.tar.gz
hdf5-0e1b41d0fd1521784128e8637b5afa8371d2779d.tar.bz2
[svn-r11229] Purpose:
Big fix Description: A group opened by dereferencing a object reference would not work for H5Giterate(), due to the local heap & B-tree information not being cached. Solution: Get the local heap & B-tree info & point to that structure instead of the group entry for the group. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'src/H5G.c')
-rw-r--r--src/H5G.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/H5G.c b/src/H5G.c
index 1f04f61..c133e90 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -468,6 +468,7 @@ herr_t
H5Giterate(hid_t loc_id, const char *name, int *idx_p,
H5G_iterate_t op, void *op_data)
{
+ H5O_stab_t stab_mesg; /*info about B-tree */
int idx;
H5G_bt_ud2_t udata;
H5G_t *grp = NULL;
@@ -498,9 +499,13 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p,
HGOTO_ERROR (H5E_ATOM, H5E_BADATOM, FAIL, "bad group atom");
}
+ /* Get the B-tree info */
+ if (NULL==H5O_read (&(grp->ent), H5O_STAB_ID, 0, &stab_mesg, H5AC_dxpl_id))
+ HGOTO_ERROR (H5E_SYM, H5E_NOTFOUND, FAIL, "unable to determine local heap address")
+
/* Build udata to pass through H5B_iterate() to H5G_node_iterate() */
udata.skip = idx;
- udata.ent = &(grp->ent);
+ udata.stab = &stab_mesg;
udata.op = op;
udata.op_data = op_data;
@@ -509,7 +514,7 @@ H5Giterate(hid_t loc_id, const char *name, int *idx_p,
/* Iterate over the group members */
if ((ret_value = H5B_iterate (H5G_fileof(grp), H5AC_dxpl_id, H5B_SNODE,
- H5G_node_iterate, udata.ent->cache.stab.btree_addr, &udata))<0)
+ H5G_node_iterate, stab_mesg.btree_addr, &udata))<0)
HERROR (H5E_SYM, H5E_CANTNEXT, "iteration operator failed");
H5I_dec_ref (udata.group_id); /*also closes 'grp'*/