]> ruderich.org/simon Gitweb - tlsproxy/tlsproxy.git/blobdiff - src/tlsproxy.c
src/connection.c: Minor cleanup.
[tlsproxy/tlsproxy.git] / src / tlsproxy.c
index 625ed0803e93fc05d96bed988d85c98c052e79b5..b79e05daec86135f8ed470b2f8bee9bf881d1b37 100644 (file)
@@ -109,11 +109,11 @@ int main(int argc, char **argv) {
         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
@@ -169,7 +169,7 @@ int main(int argc, char **argv) {
     }
 
     /* 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));
@@ -197,7 +197,7 @@ int main(int argc, char **argv) {
         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) {
@@ -266,9 +266,9 @@ static void parse_arguments(int argc, char **argv) {
     /* 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;