summaryrefslogtreecommitdiffstats
path: root/src/H5Oalloc.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-03-30 01:18:27 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-03-30 01:18:27 (GMT)
commit26fdccf6cd0325756a9365c86fd373d3eb955095 (patch)
tree59a4e13d887ac50ef8b3c96e2e556ee9a4338622 /src/H5Oalloc.c
parent85a7a522a5479bcfd36a98bf2648b49a12d03295 (diff)
downloadhdf5-26fdccf6cd0325756a9365c86fd373d3eb955095.zip
hdf5-26fdccf6cd0325756a9365c86fd373d3eb955095.tar.gz
hdf5-26fdccf6cd0325756a9365c86fd373d3eb955095.tar.bz2
[svn-r13570] Description:
Fix error when eliminating empty chunk from "middle" of list of chunks for an object header. Tested on: Mac OS X/32 10.4.9 (amazon)
Diffstat (limited to 'src/H5Oalloc.c')
-rw-r--r--src/H5Oalloc.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/H5Oalloc.c b/src/H5Oalloc.c
index ce20a27..70c627f 100644
--- a/src/H5Oalloc.c
+++ b/src/H5Oalloc.c
@@ -1525,6 +1525,21 @@ H5O_remove_empty_chunks(H5F_t *f, H5O_t *oh, hid_t dxpl_id)
HDassert(curr_msg->chunkno != deleted_chunkno);
if(curr_msg->chunkno > deleted_chunkno)
curr_msg->chunkno--;
+
+ /* Check for continuation message */
+ if(H5O_CONT_ID == curr_msg->type->id) {
+ /* Decode current continuation message if necessary */
+ if(NULL == curr_msg->native) {
+ HDassert(H5O_MSG_CONT->decode);
+ curr_msg->native = (H5O_MSG_CONT->decode)(f, dxpl_id, 0, curr_msg->raw);
+ if(NULL == curr_msg->native)
+ HGOTO_ERROR(H5E_OHDR, H5E_CANTDECODE, FAIL, "unable to decode message")
+ } /* end if */
+
+ /* Check for pointer to chunk after deleted chunk */
+ if(((H5O_cont_t *)(curr_msg->native))->chunkno > deleted_chunkno)
+ ((H5O_cont_t *)(curr_msg->native))->chunkno--;
+ } /* end if */
} /* end for */
/* Found chunk to delete */