5740aef1c7
- takeover as MAINTAINER -- ok MAINTAINER
32 lines
1.1 KiB
Plaintext
32 lines
1.1 KiB
Plaintext
$OpenBSD: operops-patch-silcd_silcd_c,v 1.2 2003/10/29 04:12:47 brad Exp $
|
|
--- silcd/silcd.c.orig 2003-07-23 05:18:14.000000000 -0400
|
|
+++ silcd/silcd.c 2003-10-27 12:28:49.000000000 -0500
|
|
@@ -255,6 +255,14 @@ SILC_TASK_CALLBACK(stop_server)
|
|
silc_schedule_stop(silcd->schedule);
|
|
}
|
|
|
|
+extern bool silc_debug;
|
|
+SILC_TASK_CALLBACK(toggle_debug)
|
|
+{
|
|
+ if(silc_debug)
|
|
+ silc_debug = FALSE;
|
|
+ else silc_debug = TRUE;
|
|
+}
|
|
+
|
|
/* Dump server statistics into a file into /tmp directory */
|
|
|
|
SILC_TASK_CALLBACK(dump_stats)
|
|
@@ -738,10 +746,12 @@ int main(int argc, char **argv)
|
|
sigaction(SIGTERM, &sa, NULL);
|
|
sigaction(SIGINT, &sa, NULL);
|
|
sigaction(SIGUSR1, &sa, NULL);
|
|
+ sigaction(SIGUSR2, &sa, NULL);
|
|
silc_schedule_signal_register(silcd->schedule, SIGHUP, got_hup, NULL);
|
|
silc_schedule_signal_register(silcd->schedule, SIGTERM, stop_server, NULL);
|
|
silc_schedule_signal_register(silcd->schedule, SIGINT, stop_server, NULL);
|
|
silc_schedule_signal_register(silcd->schedule, SIGUSR1, dump_stats, NULL);
|
|
+ silc_schedule_signal_register(silcd->schedule, SIGUSR2, toggle_debug, NULL);
|
|
|
|
if (!foreground) {
|
|
/* Before running the server, fork to background. */
|