summaryrefslogtreecommitdiffstats
path: root/src/H5O.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-11-13 21:45:35 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-11-13 21:45:35 (GMT)
commitf494ab7674dc39225deb4a06ba211f82f3e9df5e (patch)
tree55d6b6ace03aa2063c0569466d9ef474fcf66487 /src/H5O.c
parent3f7dc01ccc7f9702c3a4080afe0c2ddebf34c032 (diff)
downloadhdf5-f494ab7674dc39225deb4a06ba211f82f3e9df5e.zip
hdf5-f494ab7674dc39225deb4a06ba211f82f3e9df5e.tar.gz
hdf5-f494ab7674dc39225deb4a06ba211f82f3e9df5e.tar.bz2
[svn-r12906] Description:
Straighten out some convoluted code when links were being deleted, which could cause the "delete" callback for user-defined links to not get called when the group they were in was deleted. Had to compromise on the "delete" callback though - only calls the callback with the ID for the file the link is in, instead of the group, since the group is being held open upstream in the calling sequence during a group deletion and this prevents a group and its ID from being created. (This could possibly be worked around, but would cause a fair bit of havoc in the code and I'm not entirely certain it's worth it...) Tested on: Linux/32 2.6 (chicago)
Diffstat (limited to 'src/H5O.c')
-rw-r--r--src/H5O.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/H5O.c b/src/H5O.c
index 89194b5..5a7d1f0 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -4350,8 +4350,8 @@ done:
static herr_t
H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_mesg_t *mesg, hbool_t adj_link)
{
- const H5O_msg_class_t *type; /* Type of object to free */
- herr_t ret_value=SUCCEED; /* Return value */
+ const H5O_msg_class_t *type; /* Type of object to free */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5O_delete_mesg)
@@ -4369,13 +4369,10 @@ H5O_delete_mesg(H5F_t *f, hid_t dxpl_id, H5O_mesg_t *mesg, hbool_t adj_link)
/* Check if there is a file space deletion callback for this type of message */
if(type->del) {
- /*
- * Decode the message if necessary.
- */
+ /* Decode the message if necessary. */
if(NULL == mesg->native) {
HDassert(type->decode);
- mesg->native = (type->decode) (f, dxpl_id, mesg->raw);
- if(NULL == mesg->native)
+ if(NULL == (mesg->native = (type->decode)(f, dxpl_id, mesg->raw)))
HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode message")
} /* end if */
@@ -4955,7 +4952,7 @@ H5O_loc_copy(H5O_loc_t *dst, const H5O_loc_t *src, H5_copy_depth_t depth)
/* Deep copy the names */
if(depth == H5_COPY_DEEP) {
- /* If the original entry has holding open the file, this one should
+ /* If the original entry was holding open the file, this one should
* hold it open, too.
*/
if(src->holding_file)