summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-08-11 15:16:34 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-08-11 15:16:34 (GMT)
commit4f61812180385bb969fee33eece609180cab4866 (patch)
treebf907a614a6d65c339888097281d1d32409b1011 /tools/lib/h5trav.c
parent9474f434a37ee313be94b0388af4322ecdace648 (diff)
downloadhdf5-4f61812180385bb969fee33eece609180cab4866.zip
hdf5-4f61812180385bb969fee33eece609180cab4866.tar.gz
hdf5-4f61812180385bb969fee33eece609180cab4866.tar.bz2
[svn-r15458] Purpose: Modify the library to take the proper action when files with incorrectinactive/jpeg_converter
datatype versions are encountered. Description: The library now recognizes some problems with datatype versions in H5O_decode_helper(), and, if not performing strict format checks, automatically corrects them. Framework added for other message decode routines to automatically correct file errors. Datatype version information added to h5debug. Tested: kagiso, smirom, linew (h5committest)
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c
index 0ed6a30..bb8014d 100644
--- a/tools/lib/h5trav.c
+++ b/tools/lib/h5trav.c
@@ -159,8 +159,11 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
H5O_info_t oinfo;
/* Get information about the object */
- if(H5Oget_info_by_name(loc_id, path, &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_name(loc_id, path, &oinfo, H5P_DEFAULT) < 0) {
+ if(new_name)
+ HDfree(new_name);
return(H5_ITER_ERROR);
+ }
/* If the object has multiple links, add it to the list of addresses
* already visited, if it isn't there already
@@ -171,12 +174,20 @@ traverse_cb(hid_t loc_id, const char *path, const H5L_info_t *linfo,
/* Make 'visit object' callback */
if(udata->visitor->visit_obj)
- (*udata->visitor->visit_obj)(full_name, &oinfo, already_visited, udata->visitor->udata);
+ if((*udata->visitor->visit_obj)(full_name, &oinfo, already_visited, udata->visitor->udata) < 0) {
+ if(new_name)
+ HDfree(new_name);
+ return(H5_ITER_ERROR);
+ }
} /* end if */
else {
/* Make 'visit link' callback */
if(udata->visitor->visit_lnk)
- (*udata->visitor->visit_lnk)(full_name, linfo, udata->visitor->udata);
+ if((*udata->visitor->visit_lnk)(full_name, linfo, udata->visitor->udata) < 0) {
+ if(new_name)
+ HDfree(new_name);
+ return(H5_ITER_ERROR);
+ }
} /* end else */
if(new_name)