summaryrefslogtreecommitdiffstats
path: root/src/H5Oshared.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 /src/H5Oshared.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 'src/H5Oshared.c')
-rw-r--r--src/H5Oshared.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5Oshared.c b/src/H5Oshared.c
index e406065..aba4ddd 100644
--- a/src/H5Oshared.c
+++ b/src/H5Oshared.c
@@ -107,8 +107,8 @@
*-------------------------------------------------------------------------
*/
static void *
-H5O_shared_read(H5F_t *f, hid_t dxpl_id, const H5O_shared_t *shared,
- const H5O_msg_class_t *type)
+H5O_shared_read(H5F_t *f, hid_t dxpl_id, unsigned *ioflags,
+ const H5O_shared_t *shared, const H5O_msg_class_t *type)
{
H5HF_t *fheap = NULL;
H5WB_t *wb = NULL; /* Wrapped buffer for attribute data */
@@ -159,7 +159,7 @@ H5O_shared_read(H5F_t *f, hid_t dxpl_id, const H5O_shared_t *shared,
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, NULL, "can't read message from fractal heap.")
/* Decode the message */
- if(NULL == (ret_value = (type->decode)(f, dxpl_id, 0, mesg_ptr)))
+ if(NULL == (ret_value = (type->decode)(f, dxpl_id, 0, ioflags, mesg_ptr)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "can't decode shared message.")
} /* end if */
else {
@@ -277,7 +277,8 @@ done:
*-------------------------------------------------------------------------
*/
void *
-H5O_shared_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *buf, const H5O_msg_class_t *type)
+H5O_shared_decode(H5F_t *f, hid_t dxpl_id, unsigned *ioflags,
+ const uint8_t *buf, const H5O_msg_class_t *type)
{
H5O_shared_t sh_mesg; /* Shared message info */
unsigned version; /* Shared message version */
@@ -343,7 +344,7 @@ H5O_shared_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *buf, const H5O_msg_cla
sh_mesg.msg_type_id = type->id;
/* Retrieve actual message, through decoded shared message info */
- if(NULL == (ret_value = H5O_shared_read(f, dxpl_id, &sh_mesg, type)))
+ if(NULL == (ret_value = H5O_shared_read(f, dxpl_id, ioflags, &sh_mesg, type)))
HGOTO_ERROR(H5E_OHDR, H5E_READERROR, NULL, "unable to retrieve native message")
done: