mirror of
https://github.com/3proxy/3proxy.git
synced 2025-02-24 02:55:40 +08:00
log_mutex used prior to initialization
This commit is contained in:
parent
75a7d5bb9e
commit
58a64924dd
@ -515,6 +515,7 @@ int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int
|
|||||||
pthread_mutex_init(&hash_mutex, NULL);
|
pthread_mutex_init(&hash_mutex, NULL);
|
||||||
pthread_mutex_init(&tc_mutex, NULL);
|
pthread_mutex_init(&tc_mutex, NULL);
|
||||||
pthread_mutex_init(&pwl_mutex, NULL);
|
pthread_mutex_init(&pwl_mutex, NULL);
|
||||||
|
pthread_mutex_init(&log_mutex, NULL);
|
||||||
|
|
||||||
freeconf(&conf);
|
freeconf(&conf);
|
||||||
res = readconfig(fp);
|
res = readconfig(fp);
|
||||||
|
@ -314,7 +314,6 @@ extern pthread_mutex_t hash_mutex;
|
|||||||
extern pthread_mutex_t tc_mutex;
|
extern pthread_mutex_t tc_mutex;
|
||||||
extern pthread_mutex_t pwl_mutex;
|
extern pthread_mutex_t pwl_mutex;
|
||||||
extern pthread_mutex_t log_mutex;
|
extern pthread_mutex_t log_mutex;
|
||||||
|
|
||||||
extern struct datatype datatypes[64];
|
extern struct datatype datatypes[64];
|
||||||
|
|
||||||
extern struct commands commandhandlers[];
|
extern struct commands commandhandlers[];
|
||||||
|
@ -9,7 +9,6 @@
|
|||||||
#include "proxy.h"
|
#include "proxy.h"
|
||||||
|
|
||||||
pthread_mutex_t log_mutex;
|
pthread_mutex_t log_mutex;
|
||||||
int logmutexinit = 0;
|
|
||||||
|
|
||||||
#define param ((struct clientparam *) p)
|
#define param ((struct clientparam *) p)
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
@ -180,11 +179,6 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(!logmutexinit){
|
|
||||||
pthread_mutex_init(&log_mutex, NULL);
|
|
||||||
logmutexinit = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
srvinit(&srv, &defparam);
|
srvinit(&srv, &defparam);
|
||||||
srv.pf = childdef.pf;
|
srv.pf = childdef.pf;
|
||||||
isudp = childdef.isudp;
|
isudp = childdef.isudp;
|
||||||
@ -202,6 +196,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
srv.needuser = 0;
|
srv.needuser = 0;
|
||||||
|
pthread_mutex_init(&log_mutex, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
for (i=1; i<argc; i++) {
|
for (i=1; i<argc; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user