diff options
author | Quincey Koziol <koziol@lbl.gov> | 2020-12-10 17:01:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-10 17:01:04 (GMT) |
commit | 17a2e88769c15d8684bda4d8a6c9f53836f7b65b (patch) | |
tree | e11decdcdfdd7bf594475b3d9520a403d1478d49 /src/H5VL.c | |
parent | 4713a6d23840ed222d90f3ca73f037cb20b5d444 (diff) | |
download | hdf5-17a2e88769c15d8684bda4d8a6c9f53836f7b65b.zip hdf5-17a2e88769c15d8684bda4d8a6c9f53836f7b65b.tar.gz hdf5-17a2e88769c15d8684bda4d8a6c9f53836f7b65b.tar.bz2 |
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)
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: |