return EXIT_FAILURE;
}
- /* Setup our SIGINT signal handler which allows a "normal" termination of
- * the server in DEBUG mode. */
sigemptyset(&action.sa_mask);
action.sa_flags = 0;
#ifdef DEBUG
+ /* Setup our SIGINT signal handler which allows a "normal" termination of
+ * the server in DEBUG mode. */
action.sa_handler = sigint_handler;
sigaction(SIGINT, &action, NULL);
#endif
}
/* Fast rebinding for debug mode, could cause invalid packets. */
- if (LOG_DEBUG <= global_log_level) {
+ if (LOG_DEBUG_LEVEL <= global_log_level) {
int socket_option = 1;
setsockopt(server_socket, SOL_SOCKET, SO_REUSEADDR,
&socket_option, sizeof(socket_option));
return EXIT_FAILURE;
}
- if (LOG_DEBUG <= global_log_level) {
+ if (LOG_DEBUG_LEVEL <= global_log_level) {
printf("Listening for connections on port %d.\n", port);
if (NULL != global_proxy_host && NULL != global_proxy_port) {
/* Default values. */
thread_count = 10;
#ifdef DEBUG
- global_log_level = LOG_DEBUG;
+ global_log_level = LOG_DEBUG_LEVEL;
#else
- global_log_level = LOG_WARNING;
+ global_log_level = LOG_WARNING_LEVEL;
#endif
global_passthrough_unknown = 0;