summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-12-18 16:19:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-12-18 16:19:40 (GMT)
commit2b496c1e19c19847bd6ab9b692b13db3d3afb0a9 (patch)
tree897cbf15d1c3093345d3d266e58e9f3ef36a542b /src/H5Fint.c
parentc3df26afb44c91adde2dbe7f627704716b0e4119 (diff)
downloadhdf5-2b496c1e19c19847bd6ab9b692b13db3d3afb0a9.zip
hdf5-2b496c1e19c19847bd6ab9b692b13db3d3afb0a9.tar.gz
hdf5-2b496c1e19c19847bd6ab9b692b13db3d3afb0a9.tar.bz2
Correct error from refactoring out H5VL_FILE_CACHE_VOL_CONN callback.
Diffstat (limited to 'src/H5Fint.c')
-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() */