From 631d92b68922e7da827115d62a55425ab667c89d Mon Sep 17 00:00:00 2001 From: Arturo Borrero Gonzalez Date: Fri, 4 Nov 2016 11:37:02 +0100 Subject: log: introduce a mechanism to know if log was initialized This will allow to call dlog() function from all the points in the execution at runtime. If the log was not initialized, then we just fprintf and return. By now, we can't init the log engine earlier because we require config from the user, so there is a egg-chicken problem. This means that we can't log parsing messages to logfiles but only to stderr/stdout. Signed-off-by: Arturo Borrero Gonzalez Signed-off-by: Pablo Neira Ayuso --- include/conntrackd.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/conntrackd.h') diff --git a/include/conntrackd.h b/include/conntrackd.h index 8406c54..f995f4b 100644 --- a/include/conntrackd.h +++ b/include/conntrackd.h @@ -147,6 +147,7 @@ struct ct_general_state { sigset_t block; FILE *log; FILE *stats_log; + int log_init; struct local_server local; struct ct_mode *mode; struct ct_filter *us_filter; -- cgit v1.2.3