Skip to content

Commit 7efb69e

Browse files
committed
plugins BUGFIX static run-time plugin support
1 parent 4363428 commit 7efb69e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plugins.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,9 @@ lyplg_add_plugin(struct ly_ctx *ctx, uint32_t version, enum LYPLG type, const vo
618618

619619
LY_CHECK_ARG_RET(NULL, recs, LY_EINVAL);
620620

621-
if (version != plugins_load_info[type].apiver) {
622-
LOGERR(ctx, LY_EINVAL, "Adding user %s plugin failed, wrong API version - %d expected, %d found.",
623-
plugins_load_info[type].id, plugins_load_info[type].apiver, version);
621+
if (version != LYPLG_TYPE_API_VERSION) {
622+
LOGERR(ctx, LY_EINVAL, "Adding user %s plugin failed, wrong API version - %d expected, %" PRIu32 " found.",
623+
(type == LYPLG_TYPE) ? "type" : "extension", LYPLG_TYPE_API_VERSION, version);
624624
return LY_EINVAL;
625625
}
626626

0 commit comments

Comments
 (0)