structure. It can be used by input modules to duplicate an
entry. This solves the issue of not being able to use the same
plugin instance twice.
Signed-off-by: Eric Leblond <eric@inl.fr>
struct ulogd_pluginstance {
/* local list of plugins in this stack */
struct llist_head list;
+ /* local list of plugininstance in other stacks */
+ struct llist_head plist;
/* plugin */
struct ulogd_plugin *plugin;
/* stack that we're part of */
/* initialize */
memset(pi, 0, size);
INIT_LLIST_HEAD(&pi->list);
+ INIT_LLIST_HEAD(&pi->plist);
pi->plugin = pl;
pi->stack = stack;
memcpy(pi->id, pi_id, sizeof(pi->id));
if (!strcmp(pi->id, npi->id)) {
ulogd_log(ULOGD_INFO, "%s instance already "
"loaded\n", pi->id);
+ llist_add(&pi->plist, &npi->plist);
return 1;
}
}