summaryrefslogtreecommitdiffstats
path: root/src/H5R.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2016-02-10 17:54:15 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2016-02-10 17:54:15 (GMT)
commit4da0790886dd7f52d9bd01ef5d9191f7ff729b3e (patch)
treeae7f4cdfe0fce4207bc2d8f8720152305fba80bc /src/H5R.c
parent745513e2b039515ccec52397cf7d1d807890bc9e (diff)
downloadhdf5-4da0790886dd7f52d9bd01ef5d9191f7ff729b3e.zip
hdf5-4da0790886dd7f52d9bd01ef5d9191f7ff729b3e.tar.gz
hdf5-4da0790886dd7f52d9bd01ef5d9191f7ff729b3e.tar.bz2
[svn-r29076] Description:
Normalize against the phdf5_metadata_opt branch, in preparation for merging it to trunk. Tested on: MacOSX/64 10.11.3 (amazon) w/serial, parallel, and production builds h5committest forthcoming
Diffstat (limited to 'src/H5R.c')
-rw-r--r--src/H5R.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/H5R.c b/src/H5R.c
index 04d61cd..bc49364 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -541,12 +541,6 @@ H5R_dereference(H5F_t *file, hid_t oapl_id, hid_t dxpl_id, H5R_type_t ref_type,
{
H5D_t *dset; /* Pointer to dataset to open */
- /* Get correct property list */
- if(H5P_DEFAULT == oapl_id)
- oapl_id = H5P_DATASET_ACCESS_DEFAULT;
- else if(TRUE != H5P_isa_class(oapl_id, H5P_DATASET_ACCESS))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not dataset access property list")
-
/* Open the dataset */
if(NULL == (dset = H5D_open(&loc, oapl_id, dxpl_id)))
HGOTO_ERROR(H5E_DATASET, H5E_NOTFOUND, FAIL, "not found")
@@ -602,6 +596,7 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
{
H5G_loc_t loc; /* Group location */
H5F_t *file = NULL; /* File object */
+ hid_t dxpl_id = H5AC_dxpl_id; /* dxpl used by library */
hid_t ret_value;
FUNC_ENTER_API(FAIL)
@@ -617,11 +612,15 @@ H5Rdereference2(hid_t obj_id, hid_t oapl_id, H5R_type_t ref_type, const void *_r
if(_ref == NULL)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer")
+ /* Verify access property list and get correct dxpl */
+ if(H5P_verify_apl_and_dxpl(&oapl_id, H5P_CLS_DACC, &dxpl_id, obj_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, FAIL, "can't set access and transfer property lists")
+
/* Get the file pointer from the entry */
file = loc.oloc->file;
/* Create reference */
- if((ret_value = H5R_dereference(file, oapl_id, H5AC_dxpl_id, ref_type, _ref, TRUE)) < 0)
+ if((ret_value = H5R_dereference(file, oapl_id, dxpl_id, ref_type, _ref, TRUE)) < 0)
HGOTO_ERROR(H5E_REFERENCE, H5E_CANTINIT, FAIL, "unable to dereference object")
done: