From bc817c2077ddfb37041a20cf7c71bc71b4d56003 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sat, 20 Apr 2013 12:44:17 +0200 Subject: db: add ring buffer for DB query This patch adds an optional ring buffer option which modify the way database queries are made. The main thread is only handling kernel message reading and query formatting. The SQL request is made in a separate dedicated thread. The idea is to try to avoid buffer overrun by minimizing the time requested to treat kernel message. Doing synchronous SQL request, as it was made before was causing a delay which could cause some messages to be lost in case of burst from kernel side. --- src/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Makefile.am b/src/Makefile.am index e462cb2..1097468 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,4 +8,4 @@ sbin_PROGRAMS = ulogd ulogd_SOURCES = ulogd.c select.c timer.c rbtree.c conffile.c hash.c addr.c ulogd_LDADD = ${libdl_LIBS} -ulogd_LDFLAGS = -export-dynamic +ulogd_LDFLAGS = -export-dynamic -lpthread -- cgit v1.2.3