summaryrefslogtreecommitdiffstats
path: root/src/H5VLnative_file.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2019-08-14 19:41:14 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2019-08-14 19:46:39 (GMT)
commit7f5a5020c8ec882e6b7eceab878470003e2a8b63 (patch)
tree107d6a49588c1e6167c17433caa06e2876552123 /src/H5VLnative_file.c
parent2b72832d97496290f74ccaffcda41c3e596f8f49 (diff)
downloadhdf5-7f5a5020c8ec882e6b7eceab878470003e2a8b63.zip
hdf5-7f5a5020c8ec882e6b7eceab878470003e2a8b63.tar.gz
hdf5-7f5a5020c8ec882e6b7eceab878470003e2a8b63.tar.bz2
Fix H5F_get_file_id and H5F__get_file_id to take app_ref parameter
Fix app_ref_count from being incremented when private routines are used
Diffstat (limited to 'src/H5VLnative_file.c')
-rw-r--r--src/H5VLnative_file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5VLnative_file.c b/src/H5VLnative_file.c
index eeaade6..0ac70e3 100644
--- a/src/H5VLnative_file.c
+++ b/src/H5VLnative_file.c
@@ -562,11 +562,12 @@ H5VL__native_file_optional(void *obj, hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR
case H5VL_NATIVE_FILE_GET_FILE_ID:
{
H5I_type_t type = (H5I_type_t)HDva_arg(arguments, int); /* enum work-around */
+ hbool_t app_ref = (hbool_t)HDva_arg(arguments, int);
hid_t *file_id = HDva_arg(arguments, hid_t *);
if(NULL == (f = H5F__get_file(obj, type)))
HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "not a file or file object")
- if((*file_id = H5F__get_file_id(f)) < 0)
+ if((*file_id = H5F__get_file_id(f, app_ref)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTGET, FAIL, "can't get file ID")
break;
}