summaryrefslogtreecommitdiffstats
path: root/src/H5A.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-01-09 20:07:04 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-01-09 20:07:04 (GMT)
commit26d2abe9e87a051cd897f77a4a472a432675db8c (patch)
tree383c964fd171906b9a447a183a386a0f75c80fd1 /src/H5A.c
parent03fc4bb6f3fe785a34d71de5da392c2a9d8a278e (diff)
downloadhdf5-26d2abe9e87a051cd897f77a4a472a432675db8c.zip
hdf5-26d2abe9e87a051cd897f77a4a472a432675db8c.tar.gz
hdf5-26d2abe9e87a051cd897f77a4a472a432675db8c.tar.bz2
[svn-r13128] Description:
More progress on address bugs in combinations of shared/committed/unshared components of shared/unshared attributes in compact/dense storage. (Yes, there are a lot of combinations. :-) Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
Diffstat (limited to 'src/H5A.c')
-rw-r--r--src/H5A.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 0b846d8..e4300d5 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -383,6 +383,16 @@ H5A_create(const H5G_loc_t *loc, const char *name, const H5T_t *type,
attr->dt_size = H5O_msg_raw_size(attr->oloc.file, H5O_DTYPE_ID, attr->dt);
} /* end if */
else if(tri_ret > 0) {
+ /* Check whether datatype is committed & increment ref count */
+ /* (to maintain ref. count incr/decr similarity with "shared message"
+ * type of datatype sharing)
+ */
+ if(H5T_committed(attr->dt)) {
+ /* Increment the reference count on the shared datatype */
+ if(H5T_link(attr->dt, 1, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_OHDR, H5E_LINKCOUNT, FAIL, "unable to adjust shared datatype link count")
+ } /* end if */
+
/* Message is shared. Use size of shared message */
if(NULL == H5O_msg_get_share(H5O_DTYPE_ID, attr->dt, &sh_mesg))
HGOTO_ERROR(H5E_OHDR, H5E_BADMESG, FAIL, "couldn't get size of shared message")