/*
net.c -- most of the network code
Copyright (C) 1998-2005 Ivo Timmermans,
/*
net.c -- most of the network code
Copyright (C) 1998-2005 Ivo Timmermans,
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-static void sigint_handler(int signal, short events, void *data) {
- static int saved_debug_level = -1;
-
+static void sighup_handler(int signal, short events, void *data) {
-
- if(saved_debug_level != -1) {
- logger(LOG_NOTICE, _("Reverting to old debug level (%d)"),
- saved_debug_level);
- debug_level = saved_debug_level;
- saved_debug_level = -1;
- } else {
- logger(LOG_NOTICE,
- _("Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d."),
- debug_level);
- saved_debug_level = debug_level;
- debug_level = 5;
- }
+ reload_configuration();
connection_t *c;
splay_node_t *node, *next;
char *fname;
struct stat s;
static time_t last_config_check = 0;
connection_t *c;
splay_node_t *node, *next;
char *fname;
struct stat s;
static time_t last_config_check = 0;
if(!read_server_config()) {
logger(LOG_ERR, _("Unable to reread configuration file, exitting."));
event_loopexit(NULL);
if(!read_server_config()) {
logger(LOG_ERR, _("Unable to reread configuration file, exitting."));
event_loopexit(NULL);
event_add(&timeout_event, &(struct timeval){pingtimeout, 0});
signal_set(&sighup_event, SIGHUP, sighup_handler, NULL);
signal_add(&sighup_event, NULL);
event_add(&timeout_event, &(struct timeval){pingtimeout, 0});
signal_set(&sighup_event, SIGHUP, sighup_handler, NULL);
signal_add(&sighup_event, NULL);
signal_set(&sigterm_event, SIGTERM, sigterm_handler, NULL);
signal_add(&sigterm_event, NULL);
signal_set(&sigquit_event, SIGQUIT, sigterm_handler, NULL);
signal_add(&sigquit_event, NULL);
signal_set(&sigterm_event, SIGTERM, sigterm_handler, NULL);
signal_add(&sigterm_event, NULL);
signal_set(&sigquit_event, SIGQUIT, sigterm_handler, NULL);
signal_add(&sigquit_event, NULL);