summaryrefslogtreecommitdiffstats
path: root/src/H5Dint.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2016-02-24 21:30:35 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2016-02-24 21:30:35 (GMT)
commit337e62226ca69fea7a467ef1052a96a0015b1305 (patch)
tree9f346a45ae436099e1fa00acfccf597dbdbf56a0 /src/H5Dint.c
parent016ebfcdf247eb1b63b116babf054d2252245086 (diff)
downloadhdf5-337e62226ca69fea7a467ef1052a96a0015b1305.zip
hdf5-337e62226ca69fea7a467ef1052a96a0015b1305.tar.gz
hdf5-337e62226ca69fea7a467ef1052a96a0015b1305.tar.bz2
[svn-r29202] Fix for unknown message HDFFV-9697.
Tested on jam, ostrich, platypus, kite, quail, osx1010test, emu, mayll, moohan.
Diffstat (limited to 'src/H5Dint.c')
-rw-r--r--src/H5Dint.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5Dint.c b/src/H5Dint.c
index fe34718..733ffe7 100644
--- a/src/H5Dint.c
+++ b/src/H5Dint.c
@@ -945,15 +945,21 @@ H5D__update_oh_info(H5F_t *file, hid_t dxpl_id, H5D_t *dset, hid_t dapl_id)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Check whether to add a "bogus" message */
- if(H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME) > 0) {
+ if( (H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME) > 0) &&
+ (H5P_exist_plist(dc_plist, H5O_BOGUS_MSG_ID_NAME) > 0) ) {
+
uint8_t bogus_flags = 0; /* Flags for creating "bogus" message */
+ unsigned bogus_id; /* "bogus" ID */
+ /* Retrieve "bogus" message ID */
+ if(H5P_get(dc_plist, H5O_BOGUS_MSG_ID_NAME, &bogus_id) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus ID options")
/* Retrieve "bogus" message flags */
if(H5P_get(dc_plist, H5O_BOGUS_MSG_FLAGS_NAME, &bogus_flags) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTGET, FAIL, "can't get bogus message options")
/* Add a "bogus" message (for error testing). */
- if(H5O_bogus_oh(file, dxpl_id, oh, (unsigned)bogus_flags) < 0)
+ if(H5O_bogus_oh(file, dxpl_id, oh, bogus_id, (unsigned)bogus_flags) < 0)
HGOTO_ERROR(H5E_DATASET, H5E_CANTINIT, FAIL, "unable to create 'bogus' message")
} /* end if */
}