mirror of
https://github.com/3proxy/3proxy.git
synced 2026-11-22 23:59:41 +08:00
Remove linux futext implementation
Build Win32 3proxy-lite with Watcom / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win32 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win-arm64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win32 3proxy-lite with Watcom / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win32 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
Build Win-arm64 3proxy with MSVC / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI Linux / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI MacOS / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI Windows / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (macos-15) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (ubuntu-latest) (push) Has been cancelled
C/C++ CI cmake / ${{ matrix.target }} (windows-2022) (push) Has been cancelled
This commit is contained in:
1 parent
d125261e8c
commit
b1ac46da79
16 files changed
+134
-180
No files matched your search
+15
-15
@@ -119,7 +119,7 @@ int pushthreadinit(){
|
||||
#ifdef _WIN32
|
||||
return ReleaseSemaphore(conf.threadinit, 1, NULL) ? 1 : 0;
|
||||
#else
|
||||
pthread_mutex_unlock(&conf.threadinit);
|
||||
_3proxy_mutex_unlock(&conf.threadinit);
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
@@ -383,7 +383,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
#endif
|
||||
#else
|
||||
srv.needuser = 0;
|
||||
pthread_mutex_init(&log_mutex, NULL);
|
||||
_3proxy_mutex_init(&log_mutex);
|
||||
#endif
|
||||
|
||||
for (i=1; i<argc; i++) {
|
||||
@@ -937,15 +937,15 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
struct clientparam *toparam;
|
||||
udplen = sockrecvfrom(NULL, srv.srvsock, (struct sockaddr *)&defparam.sincr, udpbuf, UDPBUFSIZE, 0);
|
||||
if(udplen <= 0) continue;
|
||||
pthread_mutex_lock(&srv.counter_mutex);
|
||||
_3proxy_mutex_lock(&srv.counter_mutex);
|
||||
if(hashresolv(&udp_table, &defparam, &toparam, NULL)) {
|
||||
socksendto(toparam, toparam->remsock, (struct sockaddr *)&toparam->sinsr, udpbuf, udplen, 0);
|
||||
toparam->statscli64 += udplen;
|
||||
toparam->nwrites++;
|
||||
pthread_mutex_unlock(&srv.counter_mutex);
|
||||
_3proxy_mutex_unlock(&srv.counter_mutex);
|
||||
continue;
|
||||
}
|
||||
pthread_mutex_unlock(&srv.counter_mutex);
|
||||
_3proxy_mutex_unlock(&srv.counter_mutex);
|
||||
}
|
||||
#endif
|
||||
if(! (newparam = myalloc (sizeof(defparam)))){
|
||||
@@ -996,7 +996,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
#endif
|
||||
newparam->prev = newparam->next = NULL;
|
||||
error = 0;
|
||||
pthread_mutex_lock(&srv.counter_mutex);
|
||||
_3proxy_mutex_lock(&srv.counter_mutex);
|
||||
if(!srv.child){
|
||||
srv.child = newparam;
|
||||
}
|
||||
@@ -1020,7 +1020,7 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
if(!srv.silent)dolog(&defparam, buf);
|
||||
error = 1;
|
||||
}
|
||||
pthread_mutex_unlock(&srv.counter_mutex);
|
||||
_3proxy_mutex_unlock(&srv.counter_mutex);
|
||||
if(error) freeparam(newparam);
|
||||
#else
|
||||
|
||||
@@ -1031,14 +1031,14 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
if(newparam->prev) newparam->prev->next = newparam->next;
|
||||
else srv.child = newparam->next;
|
||||
if(newparam->next) newparam->next->prev = newparam->prev;
|
||||
pthread_mutex_unlock(&srv.counter_mutex);
|
||||
_3proxy_mutex_unlock(&srv.counter_mutex);
|
||||
newparam->srv = NULL;
|
||||
freeparam(newparam);
|
||||
}
|
||||
else {
|
||||
srv.childcount++;
|
||||
newparam->threadid = (uint64_t)thread;
|
||||
pthread_mutex_unlock(&srv.counter_mutex);
|
||||
_3proxy_mutex_unlock(&srv.counter_mutex);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -1048,11 +1048,11 @@ int MODULEMAINFUNC (int argc, char** argv){
|
||||
|
||||
|
||||
#ifndef STDMAIN
|
||||
pthread_mutex_lock(&config_mutex);
|
||||
_3proxy_mutex_lock(&config_mutex);
|
||||
if(srv.next)srv.next->prev = srv.prev;
|
||||
if(srv.prev)srv.prev->next = srv.next;
|
||||
else conf.services = srv.next;
|
||||
pthread_mutex_unlock(&config_mutex);
|
||||
_3proxy_mutex_unlock(&config_mutex);
|
||||
#endif
|
||||
|
||||
if(!srv.silent) srv.logfunc(&defparam, (unsigned char *)"Exiting thread");
|
||||
@@ -1101,7 +1101,7 @@ void srvinit(struct srvparam * srv, struct clientparam *param){
|
||||
param->paused = srv->paused;
|
||||
param->remsock = param->clisock = param->ctrlsock = param->ctrlsocksrv = INVALID_SOCKET;
|
||||
*SAFAMILY(¶m->req) = *SAFAMILY(¶m->sinsl) = *SAFAMILY(¶m->sinsr) = *SAFAMILY(¶m->sincr) = *SAFAMILY(¶m->sincl) = AF_INET;
|
||||
pthread_mutex_init(&srv->counter_mutex, NULL);
|
||||
_3proxy_mutex_init(&srv->counter_mutex);
|
||||
srv->intsa = conf.intsa;
|
||||
srv->extsa = conf.extsa;
|
||||
#ifndef NOIPV6
|
||||
@@ -1166,7 +1166,7 @@ void srvfree(struct srvparam * srv){
|
||||
if(srv->acl)freeacl(srv->acl);
|
||||
if(srv->authfuncs)freeauth(srv->authfuncs);
|
||||
#endif
|
||||
pthread_mutex_destroy(&srv->counter_mutex);
|
||||
_3proxy_mutex_destroy(&srv->counter_mutex);
|
||||
if(srv->target) myfree(srv->target);
|
||||
if(srv->logtarget) myfree(srv->logtarget);
|
||||
if(srv->logformat) myfree(srv->logformat);
|
||||
@@ -1183,7 +1183,7 @@ void freeparam(struct clientparam * param) {
|
||||
if(param->res == 2) return;
|
||||
if(param->srv){
|
||||
if(param->srv->so.freefunc) param->srv->so.freefunc(param->sostate);
|
||||
pthread_mutex_lock(¶m->srv->counter_mutex);
|
||||
_3proxy_mutex_lock(¶m->srv->counter_mutex);
|
||||
#ifndef STDMAIN
|
||||
if(param->srv->service == S_UDPPM) hashdelete(&udp_table, param);
|
||||
#endif
|
||||
@@ -1196,7 +1196,7 @@ void freeparam(struct clientparam * param) {
|
||||
param->next->prev = param->prev;
|
||||
}
|
||||
(param->srv->childcount)--;
|
||||
pthread_mutex_unlock(¶m->srv->counter_mutex);
|
||||
_3proxy_mutex_unlock(¶m->srv->counter_mutex);
|
||||
}
|
||||
if(param->clibuf) myfree(param->clibuf);
|
||||
if(param->srvbuf) myfree(param->srvbuf);
|
||||
|
||||
Reference in new issue
Block a user