diff --git a/mxshadowsrv.c b/mxshadowsrv.c index a867fa5..5eb2ed1 100644 --- a/mxshadowsrv.c +++ b/mxshadowsrv.c @@ -7,10 +7,6 @@ #include #include #include -#include -#ifdef DEBUG_MAX_CONNECTS -#include -#endif #include "common.h" @@ -76,9 +72,6 @@ static SSL_CTX *ssl_ctx; static sem_t free_worker; static int listen_socket; static char *filename; -#ifdef DEBUG_MAX_CONNECTS -static int debug_remaining_connects = DEBUG_MAX_CONNECTS; -#endif static void validate_shadow(char **shadow_buf, char *filename, struct stat *statbuf) { int status = pthread_mutex_lock(&shadow_mutex); @@ -271,10 +264,6 @@ int main(int argc, char **argv) { if (status) { errno = status; perror("sem_init"); exit(1); } while (1) { -#ifdef DEBUG_MAX_CONNECTS - if (debug_remaining_connects-- == 0) - break; -#endif int _cleanup_(free_fd) socket = accept4(listen_socket, NULL, NULL, SOCK_NONBLOCK); if (socket == -1 ) { perror("accept"); exit(1); } status = sem_wait(&free_worker); @@ -289,16 +278,5 @@ int main(int argc, char **argv) { socket = -1; status = pthread_detach(thread); if (status != 0) { errno = status; perror("pthread_detach"); exit(1); } - - } -#ifdef DEBUG_MAX_CONNECTS - for (int i=0; i