]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
Add valgrind compilation option.
authorEric Leblond <eric@inl.fr>
Sun, 30 Nov 2008 20:06:46 +0000 (21:06 +0100)
committerEric Leblond <eric@inl.fr>
Tue, 9 Dec 2008 00:19:25 +0000 (01:19 +0100)
Valgrind messages are obscur when the plugins are unloaded. This patch
adds a macro that can be used to desactivate unloading. To use it, you
have to specify 'CPPFLAGS=-DDEBUG_VALGRIND' on configure line.

src/ulogd.c

index 1a1f6aff4997f7b782ce4ced81372ccae3ff9a2f..badd7bde07957978eb2f6bf20023bae2958fb23c 100644 (file)
@@ -985,6 +985,7 @@ static void stop_pluginstances()
        }
 }
 
+#ifndef DEBUG_VALGRIND
 static void unload_plugins()
 {
        struct ulogd_plugin_handle *ph, *nph;
@@ -993,6 +994,7 @@ static void unload_plugins()
                free(ph);
        }
 }
+#endif
 
 static void stop_stack()
 {
@@ -1015,7 +1017,9 @@ static void sigterm_handler(int signal)
 
        stop_stack();
 
+#ifndef DEBUG_VALGRIND
        unload_plugins();
+#endif
 
        if (logfile != NULL  && logfile != stdout) {
                fclose(logfile);