diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2008-08-11 15:16:34 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2008-08-11 15:16:34 (GMT) |
commit | 4f61812180385bb969fee33eece609180cab4866 (patch) | |
tree | bf907a614a6d65c339888097281d1d32409b1011 /src/H5Oalloc.c | |
parent | 9474f434a37ee313be94b0388af4322ecdace648 (diff) | |
download | hdf5-inactive/jpeg_converter.zip hdf5-inactive/jpeg_converter.tar.gz hdf5-inactive/jpeg_converter.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 'src/H5Oalloc.c')
-rw-r--r-- | src/H5Oalloc.c | 14 |
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) |