summaryrefslogtreecommitdiffstats
path: root/src/H5Tcommit.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/H5Tcommit.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/H5Tcommit.c')
-rw-r--r--src/H5Tcommit.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 3e59c82..3eb9cd7 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -752,6 +752,7 @@ herr_t
H5Trefresh(hid_t type_id)
{
H5T_t *dt; /* Datatype for this operation */
+ 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)
@@ -768,12 +769,22 @@ H5Trefresh(hid_t type_id)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set access property list info")
/* Refresh the datatype's metadata */
- if(dt->vol_obj)
+ if(dt->vol_obj) {
+ /* Set wrapper info in API context */
+ if(H5VL_set_vol_wrapper(dt->vol_obj->data, dt->vol_obj->plugin) < 0)
+ HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't set VOL wrapper info")
+ vol_wrapper_set = TRUE;
+
if((ret_value = H5VL_datatype_specific(dt->vol_obj->data, dt->vol_obj->plugin->cls, H5VL_DATATYPE_REFRESH,
H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL, type_id)) < 0)
HGOTO_ERROR(H5E_DATATYPE, H5E_CANTLOAD, FAIL, "unable to refresh datatype")
+ } /* end if */
done:
+ /* Reset object wrapping info in API context */
+ if(vol_wrapper_set && H5VL_reset_vol_wrapper() < 0)
+ HDONE_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "can't reset VOL wrapper info")
+
FUNC_LEAVE_API(ret_value)
} /* H5Trefresh */