summaryrefslogtreecommitdiffstats
path: root/src/H5Oshared.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/H5Oshared.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/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: