summaryrefslogtreecommitdiffstats
path: root/src/H5Oflush.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-10-27 06:55:31 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-10-27 06:55:31 (GMT)
commit83e03772ebd3bc8dee8692fe9c11f2180d7b2c49 (patch)
treefb022d26e88454aa13257be1a26c2296afcac935 /src/H5Oflush.c
parent6e84fd8327138e48bd515665c1919bc8cf22dc9f (diff)
downloadhdf5-83e03772ebd3bc8dee8692fe9c11f2180d7b2c49.zip
hdf5-83e03772ebd3bc8dee8692fe9c11f2180d7b2c49.tar.gz
hdf5-83e03772ebd3bc8dee8692fe9c11f2180d7b2c49.tar.bz2
Add VOL object wrapping to API context when refreshing groups, named datatypes
and objects.
Diffstat (limited to 'src/H5Oflush.c')
-rw-r--r--src/H5Oflush.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/H5Oflush.c b/src/H5Oflush.c
index 5a27aff..887cc4c 100644
--- a/src/H5Oflush.c
+++ b/src/H5Oflush.c
@@ -239,6 +239,7 @@ H5Orefresh(hid_t oid)
{
H5VL_object_t *vol_obj = NULL; /* Object token */
H5VL_loc_params_t loc_params;
+ hbool_t vol_wrapper_set = FALSE; /* Whether the VOL object wrapping context was set up */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
@@ -256,12 +257,21 @@ H5Orefresh(hid_t oid)
loc_params.type = H5VL_OBJECT_BY_SELF;
loc_params.obj_type = H5I_get_type(oid);
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(vol_obj->data, vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
/* Refresh the object */
if((ret_value = H5VL_object_specific(vol_obj->data, loc_params, vol_obj->plugin->cls,
H5VL_OBJECT_REFRESH, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, oid)) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTLOAD, FAIL, "unable to refresh object")
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_DATASET, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* end H5Orefresh() */