summaryrefslogtreecommitdiffstats
path: root/src/H5Oattribute.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-02-12 19:06:37 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-02-12 19:06:37 (GMT)
commit02fd491bf01ff4c54980a4f1ad3fd822e6998215 (patch)
treec27bbaee35bb4072ede8915bf43b1037a924ae55 /src/H5Oattribute.c
parent3c483bd0782a3f9809d782a29a01bd1013f651f4 (diff)
downloadhdf5-02fd491bf01ff4c54980a4f1ad3fd822e6998215.zip
hdf5-02fd491bf01ff4c54980a4f1ad3fd822e6998215.tar.gz
hdf5-02fd491bf01ff4c54980a4f1ad3fd822e6998215.tar.bz2
[svn-r16477] Purpose: Fix problem with opening an attribute multiple times through multiple
file handles. Description: An attribute's "oloc" field which specifies the file it resides in was located in the attribute's "shared" structure. So when an attribute was opened multiple times all of the handles for that attribute pointed to the same file id, even if different file id's were used to open the different handles for the attribute. The "oloc" has been moved to the top level H5A_t struct. Tested: jam, smirom (h5committest)
Diffstat (limited to 'src/H5Oattribute.c')
-rw-r--r--src/H5Oattribute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Oattribute.c b/src/H5Oattribute.c
index ea9a7f5..ae016c8 100644
--- a/src/H5Oattribute.c
+++ b/src/H5Oattribute.c
@@ -700,14 +700,14 @@ htri_t H5O_attr_find_opened_attr(const H5O_loc_t *loc, H5A_t **attr, const char*
HGOTO_ERROR(H5E_ATTR, H5E_BADTYPE, FAIL, "not an attribute")
/* Get file serial number for attribute */
- if(H5F_get_fileno((*attr)->shared->oloc.file, &attr_fnum) < 0)
+ if(H5F_get_fileno((*attr)->oloc.file, &attr_fnum) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_BADVALUE, FAIL, "can't get file serial number")
/* Verify whether it's the right object. The attribute name, object address
* to which the attribute is attached, and file serial number should all
* match. */
if(!strcmp(name_to_open, (*attr)->shared->name) &&
- loc->addr == (*attr)->shared->oloc.addr &&
+ loc->addr == (*attr)->oloc.addr &&
loc_fnum == attr_fnum) {
ret_value = TRUE;
break;