summaryrefslogtreecommitdiffstats
path: root/src/H5Oalloc.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2008-08-11 15:18:54 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2008-08-11 15:18:54 (GMT)
commitf040f990a065db070a83e3217c209a83e204d6ca (patch)
treefc5d0086189dfb23a1c30f88b66ccf32cdbb550c /src/H5Oalloc.c
parent2df9af6ae8fd7bf4658e702b3e5046382dc5a852 (diff)
downloadhdf5-f040f990a065db070a83e3217c209a83e204d6ca.zip
hdf5-f040f990a065db070a83e3217c209a83e204d6ca.tar.gz
hdf5-f040f990a065db070a83e3217c209a83e204d6ca.tar.bz2
[svn-r15459] Purpose: Modify the library to take the proper action when files with incorrect
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. Resolves bz#1236, 1266. Test files with incorrect datatype versions corrected. Tested: kagiso, smirom, linew (h5committest)
Diffstat (limited to 'src/H5Oalloc.c')
-rw-r--r--src/H5Oalloc.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index 03eb956..f90e95a 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -1482,12 +1482,7 @@ H5O_remove_empty_chunks(H5F_t *f, H5O_t *oh, hid_t dxpl_id)
for(v = 0, cont_msg = &oh->mesg[0]; v < oh->nmesgs; v++, cont_msg++) {
if(H5O_CONT_ID == cont_msg->type->id) {
/* Decode current continuation message if necessary */
- if(NULL == cont_msg->native) {
- HDassert(H5O_MSG_CONT->decode);
- cont_msg->native = (H5O_MSG_CONT->decode)(f, dxpl_id, 0, cont_msg->raw);
- if(NULL == cont_msg->native)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode message")
- } /* end if */
+ H5O_LOAD_NATIVE(f, dxpl_id, 0, oh, cont_msg, FAIL)
/* Check for correct chunk to delete */
if(oh->chunk[null_msg->chunkno].addr == ((H5O_cont_t *)(cont_msg->native))->addr)
@@ -1545,12 +1540,7 @@ H5O_remove_empty_chunks(H5F_t *f, H5O_t *oh, hid_t dxpl_id)
/* Check for continuation message */
if(H5O_CONT_ID == curr_msg->type->id) {
/* Decode current continuation message if necessary */
- if(NULL == curr_msg->native) {
- HDassert(H5O_MSG_CONT->decode);
- curr_msg->native = (H5O_MSG_CONT->decode)(f, dxpl_id, 0, curr_msg->raw);
- if(NULL == curr_msg->native)
- HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode message")
- } /* end if */
+ H5O_LOAD_NATIVE(f, dxpl_id, 0, oh, curr_msg, FAIL)
/* Check for pointer to chunk after deleted chunk */
if(((H5O_cont_t *)(curr_msg->native))->chunkno > deleted_chunkno)