diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-12-10 22:30:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 22:30:07 (GMT) |
commit | ebe9a3966fcbd3e154d43dd31ba9b219c575e781 (patch) | |
tree | 6611d5c941849e6bb9087967a63736ae9eff183c /src/H5VL.c | |
parent | ff04956a6cbdda015cb6c5239d7d6007976fd2a4 (diff) | |
download | hdf5-ebe9a3966fcbd3e154d43dd31ba9b219c575e781.zip hdf5-ebe9a3966fcbd3e154d43dd31ba9b219c575e781.tar.gz hdf5-ebe9a3966fcbd3e154d43dd31ba9b219c575e781.tar.bz2 |
Merge VOL framework versioning to 1.12 (#154)
* Enforce VOL framework version compatibility when registering connectors. Also add a version for the connector itself, some refactoring on the register calls, and move the logic for matching / rejecting a VOL connector class from the plugin module to the VOL module. (#151)
* Revise VOL framework version compatibility for the 1.12 release branch
Diffstat (limited to 'src/H5VL.c')
-rw-r--r-- | src/H5VL.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -91,6 +91,9 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id) if (!cls) HGOTO_ERROR(H5E_ARGS, H5E_UNINITIALIZED, H5I_INVALID_HID, "VOL connector class pointer cannot be NULL") + if (H5VL_VERSION != cls->version) + HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, + "VOL connector has incompatible version") if (!cls->name) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "VOL connector class name cannot be the NULL pointer") @@ -113,7 +116,7 @@ H5VLregister_connector(const H5VL_class_t *cls, hid_t vipl_id) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, H5I_INVALID_HID, "not a VOL initialize property list") /* Register connector */ - if ((ret_value = H5VL__register_connector(cls, TRUE, vipl_id)) < 0) + if ((ret_value = H5VL__register_connector_by_class(cls, TRUE, vipl_id)) < 0) HGOTO_ERROR(H5E_VOL, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register VOL connector") done: |