summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-11-03 20:53:25 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-11-03 20:53:25 (GMT)
commitc350c300c49a1ff08d8fdd833ce33b3600ad277a (patch)
tree9d5f943c50cbface65b213ed7e64c3f66d77f134 /src
parentcbd9d87f755967fdf6d4385fff0618f6647d0e1d (diff)
downloadhdf5-c350c300c49a1ff08d8fdd833ce33b3600ad277a.zip
hdf5-c350c300c49a1ff08d8fdd833ce33b3600ad277a.tar.gz
hdf5-c350c300c49a1ff08d8fdd833ce33b3600ad277a.tar.bz2
[svn-r16020] Purpose: Fix behaviour of H5Ovisit
Description: H5Ovisit and H5Ovisit by name will now check for a positive return value from the first callback. Test added for this case. Tested: kagiso
Diffstat (limited to 'src')
-rw-r--r--src/H5O.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5O.c b/src/H5O.c
index bf12c3f..acd31fb 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -2810,6 +2810,10 @@ H5O_visit(hid_t loc_id, const char *obj_name, H5_index_t idx_type,
if((ret_value = op(obj_id, ".", &oinfo, op_data)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_BADITER, FAIL, "can't visit objects")
+ /* Check return value of first callback */
+ if(ret_value != H5_ITER_CONT)
+ HGOTO_DONE(ret_value);
+
/* Check for object being a group */
if(oinfo.type == H5O_TYPE_GROUP) {
H5G_loc_t start_loc; /* Location of starting group */