summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d9e03ab)
raw | patch | inline | side by side (parent: d9e03ab)
author | Sebastian Harl <sh@tokkee.org> | |
Wed, 25 Sep 2013 19:43:32 +0000 (21:43 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Wed, 25 Sep 2013 19:43:32 +0000 (21:43 +0200) |
src/core/plugin.c | patch | blob | history |
diff --git a/src/core/plugin.c b/src/core/plugin.c
index efbbcf78b7fb87d29250ef73c305a77e4e711dd0..8250dde1e7c1825cd4e676b2ac7f6239bff4e824 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
*/
struct sdb_plugin_info {
+ char *plugin_name;
+ char *filename;
+
+ /* public attributes */
char *name;
char *description;
int version;
int plugin_version;
};
-#define SDB_PLUGIN_INFO_INIT { /* name */ NULL, /* desc */ NULL, \
+#define SDB_PLUGIN_INFO_INIT { \
+ /* plugin_name */ NULL, /* filename */ NULL, \
+ /* name */ NULL, /* desc */ NULL, \
/* copyright */ NULL, /* license */ NULL, \
/* version */ -1, /* plugin_version */ -1 }
#define INFO_GET(i, attr) \
if (! info)
return;
+ if (info->plugin_name)
+ free(info->plugin_name);
+ if (info->filename)
+ free(info->filename);
+
if (info->name)
free(info->name);
if (info->description)
return -1;
}
+ ctx->info.plugin_name = strdup(name);
+ ctx->info.filename = strdup(filename);
+
if (plugin_ctx)
ctx->public = *plugin_ctx;