summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2018-12-18 17:07:28 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2018-12-18 17:07:28 (GMT)
commite8108d76992ba43fbdfda01b262e9121ad00d2ed (patch)
tree4423c2a95eb243e3421b960dacd9fdeb1066ebbc
parentddf2cbad1b90004de493b372d5d2f478e82a3024 (diff)
parentf0c83dedb64082dcbce3012e99fcb77dc1d96d1b (diff)
downloadhdf5-e8108d76992ba43fbdfda01b262e9121ad00d2ed.zip
hdf5-e8108d76992ba43fbdfda01b262e9121ad00d2ed.tar.gz
hdf5-e8108d76992ba43fbdfda01b262e9121ad00d2ed.tar.bz2
Merge branch 'develop' into vfd_init_cleanup
-rw-r--r--src/H5Fint.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index bc3b8bf..b212657 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -127,28 +127,25 @@ H5F__set_vol_conn(H5F_t *file, hid_t vol_id, const void *vol_info)
/* Sanity check */
HDassert(file);
- /* Only cache VOL connector ID & info the first time the file is opened */
- if(file->shared->nrefs == 1) {
- /* Copy connector info, if it exists */
- if(vol_info) {
- H5VL_class_t *connector; /* Pointer to connector */
+ /* Copy connector info, if it exists */
+ if(vol_info) {
+ H5VL_class_t *connector; /* Pointer to connector */
- /* Retrieve the connector for the ID */
- if(NULL == (connector = (H5VL_class_t *)H5I_object(vol_id)))
- HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID")
-
- /* Allocate and copy connector info */
- if(H5VL_copy_connector_info(connector, &new_connector_info, vol_info) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed")
- } /* end if */
+ /* Retrieve the connector for the ID */
+ if(NULL == (connector = (H5VL_class_t *)H5I_object(vol_id)))
+ HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a VOL connector ID")
- /* Cache the connector ID & info for the container */
- file->shared->vol_id = vol_id;
- file->shared->vol_info = new_connector_info;
- if(H5I_inc_ref(file->shared->vol_id, FALSE) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed")
+ /* Allocate and copy connector info */
+ if(H5VL_copy_connector_info(connector, &new_connector_info, vol_info) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTCOPY, FAIL, "connector info copy failed")
} /* end if */
+ /* Cache the connector ID & info for the container */
+ file->shared->vol_id = vol_id;
+ file->shared->vol_info = new_connector_info;
+ if(H5I_inc_ref(file->shared->vol_id, FALSE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTINC, FAIL, "incrementing VOL connector ID failed")
+
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5F__set_vol_conn() */