diff options
author | Jordan Henderson <jhenderson@hdfgroup.org> | 2020-01-03 05:51:25 (GMT) |
---|---|---|
committer | Jordan Henderson <jhenderson@hdfgroup.org> | 2020-01-03 18:43:51 (GMT) |
commit | ccf177344ae2d4b03802adecc08a6cc956a7dac5 (patch) | |
tree | c64767e1b87851109fc0cfa8acc6aac633a24735 /src/H5A.c | |
parent | 041b14c876cc7466da7868ef563563c879951ad6 (diff) | |
download | hdf5-ccf177344ae2d4b03802adecc08a6cc956a7dac5.zip hdf5-ccf177344ae2d4b03802adecc08a6cc956a7dac5.tar.gz hdf5-ccf177344ae2d4b03802adecc08a6cc956a7dac5.tar.bz2 |
Fix some places where H5P_DEFAULT gets passed down to a VOL connector
Diffstat (limited to 'src/H5A.c')
-rw-r--r-- | src/H5A.c | 36 |
1 files changed, 9 insertions, 27 deletions
@@ -383,13 +383,9 @@ H5Acreate_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, /* Verify access property list and set up collective metadata if appropriate */ if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") - - if(H5P_DEFAULT != lapl_id) { - if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID") - H5CX_set_lapl(lapl_id); - } + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info") + if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set link access property list info") /* Set up location struct */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -530,16 +526,9 @@ H5Aopen_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, /* Verify access property list and set up collective metadata if appropriate */ if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") - - /* Set lapl_id and add to context */ - if(H5P_DEFAULT != lapl_id) { - if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID") - H5CX_set_lapl(lapl_id); - } - else - lapl_id = H5P_LINK_ACCESS_DEFAULT; + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info") + if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set link access property list info") /* Fill in location struct fields */ loc_params.type = H5VL_OBJECT_BY_NAME; @@ -618,16 +607,9 @@ H5Aopen_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, /* Verify access property list and set up collective metadata if appropriate */ if(H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set access property list info") - - /* Set lapl_id and add to context */ - if(H5P_DEFAULT != lapl_id) { - if(TRUE != H5P_isa_class(lapl_id, H5P_LINK_ACCESS)) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not link access property list ID") - H5CX_set_lapl(lapl_id); - } - else - lapl_id = H5P_LINK_ACCESS_DEFAULT; + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info") + if(H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0) + HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set link access property list info") /* Fill in location struct parameters */ loc_params.type = H5VL_OBJECT_BY_IDX; |