summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
authorVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-04-23 20:04:50 (GMT)
committerVailin Choi <vchoi@jam.ad.hdfgroup.org>2019-04-23 20:04:50 (GMT)
commit1f934ae2c6e13ca020e489efa0447bc8cc74db09 (patch)
treed96dedd629406c761f761a8388ed2bbb9af0244f /src/H5P.c
parent6084b4d0038f674ce67166920116f4631c84e78c (diff)
downloadhdf5-1f934ae2c6e13ca020e489efa0447bc8cc74db09.zip
hdf5-1f934ae2c6e13ca020e489efa0447bc8cc74db09.tar.gz
hdf5-1f934ae2c6e13ca020e489efa0447bc8cc74db09.tar.bz2
Make corresponding changes for H5Sencode based on PR #1645 to develop branch.
The core changes are to revert previous modifications now that we use API context for fapl.
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/H5P.c b/src/H5P.c
index 180e005..9d3b903 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -840,10 +840,7 @@ herr_t
H5Pencode(hid_t plist_id, void *buf, size_t *nalloc)
{
H5P_genplist_t *plist; /* Property list to query */
- H5P_genplist_t *fapl_plist;
- hid_t new_fapl_id;
- H5F_libver_t low_bound = H5F_LIBVER_V110;
- H5F_libver_t high_bound = H5F_LIBVER_V110;
+ hid_t temp_fapl_id = H5P_DEFAULT;
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(FAIL)
@@ -853,8 +850,12 @@ H5Pencode(hid_t plist_id, void *buf, size_t *nalloc)
if(NULL == (plist = (H5P_genplist_t *)H5I_object_verify(plist_id, H5I_GENPROP_LST)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list");
+ /* Verify access property list and set up collective metadata if appropriate */
+ if(H5CX_set_apl(&temp_fapl_id, H5P_CLS_FACC, H5I_INVALID_HID, TRUE) < 0)
+ HGOTO_ERROR(H5E_FILE, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info")
+
/* Call the internal encode routine */
- if((ret_value = H5P__encode(plist, TRUE, buf, nalloc, H5P_FILE_ACCESS_DEFAULT)) < 0)
+ if((ret_value = H5P__encode(plist, TRUE, buf, nalloc)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTENCODE, FAIL, "unable to encode property list");
done: