From a2b54da7ebec0883fcc812ae86033a6d5fa36c5d Mon Sep 17 00:00:00 2001 From: David Sommerseth Date: Mon, 9 Jan 2012 01:44:32 +0100 Subject: Add eDBdisconnect_firewall() database driver function If this function is found declared in the database driver, it will be used instead of eDBdisconnect() when forking the firewall thread. This is to avoid disconnecting some databases in the wrong way. This new function is fully optional to implement if the database driver works fine with calling eDBdisconnect(). Signed-off-by: David Sommerseth --- plugin/firewall/eurephiafw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/firewall/eurephiafw.c b/plugin/firewall/eurephiafw.c index d74a383..51661d6 100644 --- a/plugin/firewall/eurephiafw.c +++ b/plugin/firewall/eurephiafw.c @@ -254,7 +254,11 @@ void eFW_StartFirewall(eurephiaCTX *ctx, const int daemon, const int logredir) { if( daemon ) { efw_daemonize(ctx, logredir); } - eDBdisconnect(ctx); + if( eDBdisconnect_firewall == NULL ) { + eDBdisconnect(ctx); + } else { + eDBdisconnect_firewall(ctx); + } eFW_RunFirewall(&(*ctx->fwcfg).thrdata); exit(-1); // If our child process exits abnormally. -- cgit