summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-10-31 23:18:45 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-10-31 23:18:45 (GMT)
commitd66d5e01c0605e5dc3b5c975419aaf551a4458b0 (patch)
treedbe5ebe478cc4172ecfb308e64b9f8beff741e64 /src/H5Fint.c
parent4c6d8d376caca61267a708e82933b9c3d60d6c15 (diff)
downloadhdf5-d66d5e01c0605e5dc3b5c975419aaf551a4458b0.zip
hdf5-d66d5e01c0605e5dc3b5c975419aaf551a4458b0.tar.gz
hdf5-d66d5e01c0605e5dc3b5c975419aaf551a4458b0.tar.bz2
Refactor and standarize file object callbacks, including some fixes on the
dataset callbacks.
Diffstat (limited to 'src/H5Fint.c')
-rw-r--r--src/H5Fint.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 0e35bea..fe387a5 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -3529,14 +3529,8 @@ H5F_get_file_id(hid_t obj_id, H5I_type_t type)
if(NULL == (vol_obj = H5VL_vol_object(obj_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "invalid identifier")
- /* Set wrapper info in API context */
- if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
- HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
- vol_wrapper_set = TRUE;
-
/* Get the file through the VOL */
- if(H5VL_file_optional(vol_obj->data, vol_obj->plugin->cls, H5P_DATASET_XFER_DEFAULT,
- H5_REQUEST_NULL, H5VL_FILE_GET_FILE, type, &file) < 0)
+ if(H5VL_file_optional(vol_obj, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, H5VL_FILE_GET_FILE, type, &file) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get file")
if(NULL == file)
HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to get the file through the VOL")
@@ -3547,6 +3541,11 @@ H5F_get_file_id(hid_t obj_id, H5I_type_t type)
/* If the ID does not exist, register it with the VOL plugin */
if(H5I_INVALID_HID == ret_value) {
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
{
void *vol_wrap_ctx = NULL; /* Object wrapping context */