diff options
author | kmu <kmu@hdfgroup.org> | 2019-11-27 03:59:51 (GMT) |
---|---|---|
committer | kmu <kmu@hdfgroup.org> | 2019-11-27 03:59:51 (GMT) |
commit | ea0759d047dc6421da90375a9c27f7cde0a8e117 (patch) | |
tree | 81df83e8c53a80b61365d579b26aeb9532fe493f /src/H5Rint.c | |
parent | e0262c8bedf0e59b7b32b02ecd91ed50cf834a1c (diff) | |
parent | 9f61c26927ac74c4498cbebd7c9f2166d5f5b786 (diff) | |
download | hdf5-ea0759d047dc6421da90375a9c27f7cde0a8e117.zip hdf5-ea0759d047dc6421da90375a9c27f7cde0a8e117.tar.gz hdf5-ea0759d047dc6421da90375a9c27f7cde0a8e117.tar.bz2 |
Merge branch 'develop' of https://git.hdfgroup.org/scm/hdffv/hdf5 into develop
Diffstat (limited to 'src/H5Rint.c')
-rw-r--r-- | src/H5Rint.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/H5Rint.c b/src/H5Rint.c index 443a245..9fbc7ef 100644 --- a/src/H5Rint.c +++ b/src/H5Rint.c @@ -504,6 +504,7 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) H5VL_connector_prop_t connector_prop; unsigned flags = H5F_ACC_RDWR; /* Must open file read-write to allow for object modifications */ H5P_genplist_t *plist; + H5VL_object_t *vol_obj = NULL; /* VOL object for file */ hid_t ret_value = H5I_INVALID_HID; FUNC_ENTER_PACKAGE @@ -534,6 +535,14 @@ H5R__reopen_file(H5R_ref_priv_t *ref, hid_t fapl_id) if((ret_value = H5VL_register_using_vol_id(H5I_FILE, new_file, connector_prop.connector_id, TRUE)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize file handle") + /* Get the file object */ + if(NULL == (vol_obj = H5VL_vol_object(ret_value))) + HGOTO_ERROR(H5E_FILE, H5E_CANTGET, H5I_INVALID_HID, "invalid object identifier") + + /* Make the post open callback */ + if(H5VL_file_specific(vol_obj, H5VL_FILE_POST_OPEN, H5P_DATASET_XFER_DEFAULT, H5_REQUEST_NULL) < 0) + HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, H5I_INVALID_HID, "unable to make file post open callback") + /* Attach loc_id to reference */ if(H5R__set_loc_id((H5R_ref_priv_t *)ref, ret_value, FALSE) < 0) HGOTO_ERROR(H5E_REFERENCE, H5E_CANTSET, H5I_INVALID_HID, "unable to attach location id to reference") @@ -1160,8 +1169,8 @@ H5R__encode_region(H5S_t *space, unsigned char *buf, size_t *nalloc) /* Don't encode if buffer size isn't big enough or buffer is empty */ if(buf && *nalloc >= ((size_t)buf_size + 2 * H5_SIZEOF_UINT32_T)) { - p = (uint8_t *)buf; int rank; + p = (uint8_t *)buf; /* Encode the size for safety check */ UINT32ENCODE(p, (uint32_t)buf_size); |