summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2002-06-15 17:31:31 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2002-06-15 17:31:31 +0000
commit8a9db9397785e597f394adc344bd041ede88ec67 (patch)
treed38a9b549619013e9a074ee18a261776fd70e8ec /src
parentfb688a2077db8044e7f8621ec7c5c29bf72e3935 (diff)
downloadtinyproxy-8a9db9397785e597f394adc344bd041ede88ec67.tar.gz
tinyproxy-8a9db9397785e597f394adc344bd041ede88ec67.zip
(child_main_loop): Moved the filter re-initiation code into the loop. This code is activated whenever the SIGHUP signal is received.
Diffstat (limited to '')
-rw-r--r--src/child.c16
1 files 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;
}
}
}