summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-23 15:27:28 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-23 15:27:28 (GMT)
commit4bc8c3f9240a57ecba8e57d5a88af6f58c25c15c (patch)
tree66535ad56982dbd650e8ad4c4eafb1bb7f8d8dc1 /src/H5Ocopy.c
parent599d4141fad83b181d11adb17ca645877706308b (diff)
downloadhdf5-4bc8c3f9240a57ecba8e57d5a88af6f58c25c15c.zip
hdf5-4bc8c3f9240a57ecba8e57d5a88af6f58c25c15c.tar.gz
hdf5-4bc8c3f9240a57ecba8e57d5a88af6f58c25c15c.tar.bz2
[svn-r13178] Description:
Figured out a way to phase in individual message class support for the new shared message "interface", so check that in before working on the message classes themselves. Tested on: Mac OS X/32 10.4.8 (amazon) FreeBSD/32 6.2 (duty)
Diffstat (limited to 'src/H5Ocopy.c')
-rw-r--r--src/H5Ocopy.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/H5Ocopy.c b/src/H5Ocopy.c
index c1d7d04..d4a0aec 100644
--- a/src/H5Ocopy.c
+++ b/src/H5Ocopy.c
@@ -397,7 +397,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
HDassert(!mesg_src->dirty); /* Should be cleared by earlier call to flush messages */
/* Check for shared message to operate on */
- if(mesg_src->flags & H5O_MSG_FLAG_SHARED)
+ if((mesg_src->flags & H5O_MSG_FLAG_SHARED) && !H5O_NEW_SHARED(mesg_src->type))
copy_type = H5O_MSG_SHARED;
else
copy_type = mesg_src->type;
@@ -487,7 +487,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
/* (Use destination message, in case the message has been removed (i.e
* converted to a nil message) in the destination -QAK)
*/
- if(mesg_dst->flags & H5O_MSG_FLAG_SHARED)
+ if((mesg_dst->flags & H5O_MSG_FLAG_SHARED) && !H5O_NEW_SHARED(mesg_dst->type))
copy_type = H5O_MSG_SHARED;
else
copy_type = mesg_dst->type;
@@ -523,17 +523,21 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
/* Recompute shared message size (mesg_dst->native is really
* an H5O_shared_t)
*/
- mesg_dst->raw_size = H5O_ALIGN_OH(oh_dst,
- H5O_msg_raw_size(oloc_dst->file, H5O_SHARED_ID, mesg_dst->native));
- }
+ if(!H5O_NEW_SHARED(mesg_dst->type))
+ mesg_dst->raw_size = H5O_ALIGN_OH(oh_dst,
+ H5O_msg_raw_size(oloc_dst->file, H5O_SHARED_ID, mesg_dst->native));
+ } /* end if */
else if(shared == FALSE && (mesg_dst->flags & H5O_MSG_FLAG_SHARED)) {
/* Unset shared flag */
mesg_dst->flags &= ~H5O_MSG_FLAG_SHARED;
- /* Recompute native message size */
- mesg_dst->raw_size = H5O_ALIGN_OH(oh_dst,
- H5O_msg_raw_size(oloc_dst->file, mesg_dst->type->id, mesg_dst->native));
- }
+ /* Recompute native message size (msg_dest->native is no longer
+ * an H5O_shared_t)
+ */
+ if(!H5O_NEW_SHARED(mesg_dst->type))
+ mesg_dst->raw_size = H5O_ALIGN_OH(oh_dst,
+ H5O_msg_raw_size(oloc_dst->file, mesg_dst->type->id, mesg_dst->native));
+ } /* end else */
/* Mark the message in the destination as dirty, so it'll get encoded when the object header is flushed */
mesg_dst->dirty = TRUE;
@@ -659,7 +663,7 @@ H5O_copy_header_real(const H5O_loc_t *oloc_src, H5O_loc_t *oloc_dst /*out */,
/* (Use destination message, in case the message has been removed (i.e
* converted to a nil message) in the destination -QAK)
*/
- if(mesg_dst->flags & H5O_MSG_FLAG_SHARED)
+ if((mesg_dst->flags & H5O_MSG_FLAG_SHARED) && !H5O_NEW_SHARED(mesg_dst->type))
copy_type = H5O_MSG_SHARED;
else
copy_type = mesg_dst->type;