From 8a9db9397785e597f394adc344bd041ede88ec67 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Sat, 15 Jun 2002 17:31:31 +0000 Subject: (child_main_loop): Moved the filter re-initiation code into the loop. This code is activated whenever the SIGHUP signal is received. --- src/child.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/child.c b/src/child.c index 36cab71..9aaee36 100644 --- a/src/child.c +++ b/src/child.c @@ -1,4 +1,4 @@ -/* $Id: child.c,v 1.3 2002-06-05 17:02:15 rjkaes Exp $ +/* $Id: child.c,v 1.4 2002-06-15 17:31:31 rjkaes Exp $ * * Handles the creation/destruction of the various children required for * processing incoming connections. @@ -19,6 +19,7 @@ #include "tinyproxy.h" #include "child.h" +#include "filter.h" #include "heap.h" #include "log.h" #include "reqs.h" @@ -372,9 +373,16 @@ child_main_loop(void) sleep(5); /* Handle log rotation if it was requested */ - if (log_rotation_request) { - rotate_log_files(); - log_rotation_request = FALSE; + if (received_sighup) { +#ifdef FILTER_ENABLE + if (config.filter) { + filter_destroy(); + filter_init(); + } + log_message(LOG_NOTICE, "Re-reading filter file."); +#endif /* FILTER_ENABLE */ + + received_sighup = FALSE; } } } -- cgit v1.2.3