X-Git-Url: http://git.pk910.de/?p=NeonServV5.git;a=blobdiff_plain;f=src%2Fmain.c;h=fb16300da97ac5697e13adfcc59b85811a8468d3;hp=d2c482af117619ca01653c4aa38b113f3f628933;hb=HEAD;hpb=ee39770362f69ced5b52104b622582e882af0b77 diff --git a/src/main.c b/src/main.c index d2c482a..fb16300 100644 --- a/src/main.c +++ b/src/main.c @@ -52,7 +52,6 @@ struct ProcessState process_state; #ifdef HAVE_THREADS pthread_mutex_t cache_sync; pthread_mutex_t whohandler_sync, whohandler_mass_sync; -static pthread_mutex_t log_sync; static pthread_t *current_threads = NULL; #endif @@ -306,6 +305,11 @@ int main(int argc, char *argv[]) { initMemoryDebug(); #endif + //initialize mutex debugger BEFORE using any mutexes + #ifdef ENABLE_MUTEX_DEBUG + initMutexDebug(); + #endif + //deny root startup #ifndef WIN32 if(geteuid() == 0 || getuid() == 0) { @@ -336,7 +340,6 @@ int main(int argc, char *argv[]) { free(modulelist); #if HAVE_THREADS - THREAD_MUTEX_INIT(log_sync); THREAD_MUTEX_INIT(cache_sync); THREAD_MUTEX_INIT(whohandler_sync); THREAD_MUTEX_INIT(whohandler_mass_sync);