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/H5Oshared.h | |
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/H5Oshared.h')
-rw-r--r-- | src/H5Oshared.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/H5Oshared.h b/src/H5Oshared.h index 582d29b..2e23e60 100644 --- a/src/H5Oshared.h +++ b/src/H5Oshared.h @@ -48,7 +48,8 @@ *------------------------------------------------------------------------- */ static H5_inline void * -H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, unsigned mesg_flags, const uint8_t *p) +H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, unsigned mesg_flags, + unsigned *ioflags, const uint8_t *p) { void *ret_value; /* Return value */ @@ -67,12 +68,20 @@ H5O_SHARED_DECODE(H5F_t *f, hid_t dxpl_id, unsigned mesg_flags, const uint8_t *p /* Check for shared message */ if(mesg_flags & H5O_MSG_FLAG_SHARED) { /* Retrieve native message info indirectly through shared message */ - if(NULL == (ret_value = H5O_shared_decode(f, dxpl_id, p, H5O_SHARED_TYPE))) + if(NULL == (ret_value = H5O_shared_decode(f, dxpl_id, ioflags, p, H5O_SHARED_TYPE))) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode shared message") + + /* We currently do not support automatically fixing shared messages */ +#ifdef H5_STRICT_FORMAT_CHECKS + if(*ioflags & H5O_DECODEIO_DIRTY) + HGOTO_ERROR(H5E_OHDR, H5E_UNSUPPORTED, NULL, "unable to mark shared message dirty") +#else /* H5_STRICT_FORMAT_CHECKS */ + *ioflags &= ~H5O_DECODEIO_DIRTY; +#endif /* H5_STRICT_FORMAT_CHECKS */ } /* end if */ else { /* Decode native message directly */ - if(NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, mesg_flags, p))) + if(NULL == (ret_value = H5O_SHARED_DECODE_REAL(f, dxpl_id, mesg_flags, ioflags, p))) HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode native message") } /* end else */ |