diff options
| author | David Sommerseth <dazo@users.sourceforge.net> | 2012-01-09 01:44:32 +0100 |
|---|---|---|
| committer | David Sommerseth <dazo@users.sourceforge.net> | 2013-06-13 01:01:55 +0200 |
| commit | a2b54da7ebec0883fcc812ae86033a6d5fa36c5d (patch) | |
| tree | 61b03d39c2de60c967fc2d34a000b26a14a4c710 /plugin/firewall | |
| parent | 52497ab789ce706d6c726d347dfc8af7bedfee89 (diff) | |
| download | eurephia-a2b54da7ebec0883fcc812ae86033a6d5fa36c5d.tar.gz eurephia-a2b54da7ebec0883fcc812ae86033a6d5fa36c5d.tar.xz eurephia-a2b54da7ebec0883fcc812ae86033a6d5fa36c5d.zip | |
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 <dazo@users.sourceforge.net>
Diffstat (limited to 'plugin/firewall')
| -rw-r--r-- | plugin/firewall/eurephiafw.c | 6 |
1 files changed, 5 insertions, 1 deletions
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. |
