[netfilter-cvslog] r7412 - in branches/ulog/ulogd2: include/ulogd src

pablo at netfilter.org pablo at netfilter.org
Tue Mar 25 10:57:12 CET 2008


Author: pablo at netfilter.org
Date: 2008-03-25 10:57:12 +0100 (Tue, 25 Mar 2008)
New Revision: 7412

Modified:
   branches/ulog/ulogd2/include/ulogd/ulogd.h
   branches/ulog/ulogd2/src/ulogd.c
Log:
This patch adds plist a linked list to the pluginstance
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 at inl.fr>


Modified: branches/ulog/ulogd2/include/ulogd/ulogd.h
===================================================================
--- branches/ulog/ulogd2/include/ulogd/ulogd.h	2008-03-25 08:56:08 UTC (rev 7411)
+++ branches/ulog/ulogd2/include/ulogd/ulogd.h	2008-03-25 09:57:12 UTC (rev 7412)
@@ -168,6 +168,8 @@
 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 */

Modified: branches/ulog/ulogd2/src/ulogd.c
===================================================================
--- branches/ulog/ulogd2/src/ulogd.c	2008-03-25 08:56:08 UTC (rev 7411)
+++ branches/ulog/ulogd2/src/ulogd.c	2008-03-25 09:57:12 UTC (rev 7412)
@@ -529,6 +529,7 @@
 	/* 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));
@@ -721,6 +722,7 @@
 			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;
 			}
 		}




More information about the netfilter-cvslog mailing list