summaryrefslogtreecommitdiffstats
path: root/src/H5Omessage.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-02-12 18:47:04 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-02-12 18:47:04 (GMT)
commitfb81174e767b62bcccd45b68611255982e96d449 (patch)
tree55735c9f26b3e1720a061856cd14f497b356e16b /src/H5Omessage.c
parente52b18bf2c3ad7c2a58176617001d05e50cc3f51 (diff)
downloadhdf5-fb81174e767b62bcccd45b68611255982e96d449.zip
hdf5-fb81174e767b62bcccd45b68611255982e96d449.tar.gz
hdf5-fb81174e767b62bcccd45b68611255982e96d449.tar.bz2
[svn-r16473] Purpose: fix problems related to 'self-referential' attributes
Description: When an attribute was created with a datatype or dataspace that was shared in the same object header that the attribute was in, the attribute could not be deleted. Changes made to ensure that the attribute can be deleted both when the attribute is in the object header and when it is shared in the heap. Object header message decode routines now take an "open_oh" parameter to enable them to avoid opening the same object header twice. Tested: jam, smirom (h5committest)
Diffstat (limited to 'src/H5Omessage.c')
-rw-r--r--src/H5Omessage.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/H5Omessage.c b/src/H5Omessage.c
index a63299a..286240c 100644
--- a/src/H5Omessage.c
+++ b/src/H5Omessage.c
@@ -1804,10 +1804,16 @@ done:
* slu@ncsa.uiuc.edu
* July 14, 2004
*
+ * Modifications: Neil Fortner
+ * Feb 4 2009
+ * Added open_oh parameter. This parameter is optional and
+ * contains this message's protected object header
+ *
*-------------------------------------------------------------------------
*/
void *
-H5O_msg_decode(H5F_t *f, hid_t dxpl_id, unsigned type_id, const unsigned char *buf)
+H5O_msg_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, unsigned type_id,
+ const unsigned char *buf)
{
const H5O_msg_class_t *type; /* Actual H5O class type for the ID */
void *ret_value; /* Return value */
@@ -1822,7 +1828,7 @@ H5O_msg_decode(H5F_t *f, hid_t dxpl_id, unsigned type_id, const unsigned char *b
HDassert(type);
/* decode */
- if((ret_value = (type->decode)(f, dxpl_id, 0, &ioflags, buf)) == NULL)
+ if((ret_value = (type->decode)(f, dxpl_id, open_oh, 0, &ioflags, buf)) == NULL)
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, NULL, "unable to decode message")
done: