summaryrefslogtreecommitdiffstats
path: root/src/H5L.c
diff options
context:
space:
mode:
authorChris Hogan <chogan@hdfgroup.org>2019-10-28 21:24:54 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-05-20 14:17:26 (GMT)
commitd4fb9dbc6100d235f93e4803db7a4a10fbc8eeab (patch)
tree9f8d9c74c3b7994d70ea46f56a1a0a9f01eb1015 /src/H5L.c
parent49a4f6e64bca3576c90baad4ac92e300e7cea480 (diff)
downloadhdf5-d4fb9dbc6100d235f93e4803db7a4a10fbc8eeab.zip
hdf5-d4fb9dbc6100d235f93e4803db7a4a10fbc8eeab.tar.gz
hdf5-d4fb9dbc6100d235f93e4803db7a4a10fbc8eeab.tar.bz2
Use API context to store/retrieve LCPL when creating intermediate groups
Diffstat (limited to 'src/H5L.c')
-rw-r--r--src/H5L.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/H5L.c b/src/H5L.c
index 1e554a9..794585c 100644
--- a/src/H5L.c
+++ b/src/H5L.c
@@ -473,10 +473,13 @@ H5Lcreate_soft(const char *link_target, hid_t link_loc_id, const char *link_name
if(lcpl_id != H5P_DEFAULT && (TRUE != H5P_isa_class(lcpl_id, H5P_LINK_CREATE)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a link creation property list")
- /* Check the group access property list */
+ /* Get the link creation property list */
if(H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
+ /* Set the LCPL for the API context */
+ H5CX_set_lcpl(lcpl_id);
+
/* Set location fields */
loc_params.type = H5VL_OBJECT_BY_NAME;
loc_params.loc_data.loc_by_name.name = link_name;
@@ -549,6 +552,9 @@ H5Lcreate_hard(hid_t cur_loc_id, const char *cur_name,
if(H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
+ /* Set the LCPL for the API context */
+ H5CX_set_lcpl(lcpl_id);
+
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, cur_loc_id, TRUE) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
@@ -635,10 +641,13 @@ H5Lcreate_ud(hid_t link_loc_id, const char *link_name, H5L_type_t link_type,
if(!udata && udata_size)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "udata cannot be NULL if udata_size is non-zero")
- /* Check the group access property list */
+ /* Get the link creation property list */
if(H5P_DEFAULT == lcpl_id)
lcpl_id = H5P_LINK_CREATE_DEFAULT;
+ /* Set the LCPL for the API context */
+ H5CX_set_lcpl(lcpl_id);
+
/* Verify access property list and set up collective metadata if appropriate */
if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, link_loc_id, TRUE) < 0)
HGOTO_ERROR(H5E_LINK, H5E_CANTSET, FAIL, "can't set access property list info")
@@ -1992,8 +2001,8 @@ H5L__create_real(const H5G_loc_t *link_loc, const char *link_name,
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
/* Get intermediate group creation property */
- if(H5P_get(lc_plist, H5L_CRT_INTERMEDIATE_GROUP_NAME, &crt_intmd_group) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get property value for creating missing groups")
+ if(H5CX_get_create_intermediate_group(&crt_intmd_group) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get 'create intermediate group' property")
if(crt_intmd_group > 0)
target_flags |= H5G_CRT_INTMD_GROUP;