summaryrefslogtreecommitdiffstats
path: root/src/H5Oattribute.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-01-29 20:43:16 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-01-29 20:43:16 (GMT)
commitec614163246fb78844d773b58b12d4451a4acaa4 (patch)
tree3f02a3e584278a5a94778659fac257033a6a73a9 /src/H5Oattribute.c
parent9a298fd1dda2ed9b12e68cc64ccce5c95216fd6a (diff)
downloadhdf5-ec614163246fb78844d773b58b12d4451a4acaa4.zip
hdf5-ec614163246fb78844d773b58b12d4451a4acaa4.tar.gz
hdf5-ec614163246fb78844d773b58b12d4451a4acaa4.tar.bz2
[svn-r16376] Purpose: Fix a bug encountered when copying shared messages
Description: When attempting to copy an object with a message shared in its own object header, the library attempts to protect the same object header twice. Previously, it was possible for the object header to be protected with write access in one or both of these protects, which would be illegal. The library should now always protect with read only access in this case. The conditions for fixing incorrect datatype versions have been made weaker to support this change. The version will only be corrected if the object header the datatype is in is modified. Tested: jam, smirom (h5committest)
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r--src/H5Oattribute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index 846d2ec..ea9a7f5 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -1207,7 +1207,7 @@ H5O_attr_iterate_real(hid_t loc_id, const H5O_loc_t *loc, hid_t dxpl_id,
/* Protect the object header to iterate over */
if(NULL == (oh = (H5O_t *)H5AC_protect(loc->file, dxpl_id, H5AC_OHDR, loc->addr,
- NULL, NULL, (H5F_get_intent(loc->file) & H5F_ACC_RDWR) ? H5AC_WRITE : H5AC_READ)))
+ NULL, NULL, H5AC_READ)))
HGOTO_ERROR(H5E_ATTR, H5E_CANTLOAD, FAIL, "unable to load object header")
/* Check for attribute info stored */