summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa416a5)
raw | patch | inline | side by side (parent: aa416a5)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 15 Nov 2016 20:30:15 +0000 (21:30 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 15 Nov 2016 20:30:15 +0000 (21:30 +0100) |
src/core/plugin.c | patch | blob | history |
diff --git a/src/core/plugin.c b/src/core/plugin.c
index e350494979f67c6c69f5183eaa94d02b733b997f..76fc2092d022ff8588a2b5f11739e8653fa5c1c4 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
if ((status = module_init(name, lh, &ctx->info))) {
sdb_object_deref(SDB_OBJ(ctx));
+ ctx_set(NULL);
return status;
}
ctx_t *old_ctx = ctx_set(ctx);
status = module_init(ctx->info.plugin_name, ctx->handle, NULL);
+ ctx_set(old_ctx);
if (status)
return status;
sdb_log(SDB_LOG_INFO, "core: Successfully reloaded plugin "
"'%s' (%s)", ctx->info.plugin_name,
INFO_GET(&ctx->info, description));
- ctx_set(old_ctx);
}
++ctx->use_cnt;
return 0;