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

This commit is contained in:
Vladimir Dubrovin committed 2026-04-28 18:06:54 +03:00
1 parent d125261e8c
commit b1ac46da79
16 files changed
+134 -180

No files matched your search

+10 -10
View File
@@ -45,7 +45,7 @@ extern "C" {
static struct pluginlink * pl;
static pthread_mutex_t file_mutex;
static _3proxy_mutex_t file_mutex;
unsigned long preview = 0;
@@ -207,7 +207,7 @@ static void closefiles(struct fp_stream *fps){
static int searchsocket(SOCKET s, struct fp_stream **pfps){
struct fp_stream *fps = NULL;
int ret = 0;
pthread_mutex_lock(&file_mutex);
_3proxy_mutex_lock(&file_mutex);
for(fps = fp_streams; fps; fps = fps->next){
if(fps->fpd.cp->clisock == s) {
ret = 1;
@@ -222,7 +222,7 @@ static int searchsocket(SOCKET s, struct fp_stream **pfps){
break;
}
}
pthread_mutex_unlock(&file_mutex);
_3proxy_mutex_unlock(&file_mutex);
*pfps = fps;
return ret;
}
@@ -235,7 +235,7 @@ static void freecallback(struct fp_stream * fps, struct fp_callback * fpc){
static void removefps(struct fp_stream * fps){
if(!fp_streams) return;
pthread_mutex_lock(&file_mutex);
_3proxy_mutex_lock(&file_mutex);
if(fp_streams == fps)fp_streams = fps->next;
else {
struct fp_stream *fps2;
@@ -248,7 +248,7 @@ static void removefps(struct fp_stream * fps){
}
}
pthread_mutex_unlock(&file_mutex);
_3proxy_mutex_unlock(&file_mutex);
if(fps->callbacks){
freecallback(fps, fps->callbacks);
fps->callbacks = 0;
@@ -754,7 +754,7 @@ static int fp_registercallback (int what, int max_size, int preview_size, struct
fpc->max_size = max_size;
fpc->data = data;
fpc->callback = cb;
pthread_mutex_lock(&file_mutex);
_3proxy_mutex_lock(&file_mutex);
fps = addfps(cp);
if(fps){
fpc->next = fps->callbacks;
@@ -763,7 +763,7 @@ static int fp_registercallback (int what, int max_size, int preview_size, struct
if(preview_size > fps->preview_size) fps->preview_size = preview_size;
}
else free(fpc);
pthread_mutex_unlock(&file_mutex);
_3proxy_mutex_unlock(&file_mutex);
return fps?1:0;
}
@@ -777,9 +777,9 @@ static void * fp_open(void * idata, struct srvparam * param){
static FILTER_ACTION fp_client(void *fo, struct clientparam * param, void** fc){
pthread_mutex_lock(&file_mutex);
_3proxy_mutex_lock(&file_mutex);
(*fc) = (void *)addfps(param);
pthread_mutex_unlock(&file_mutex);
_3proxy_mutex_unlock(&file_mutex);
return CONTINUE;
}
@@ -913,7 +913,7 @@ static int file_loaded=0;
int argc, char** argv){
if(!file_loaded){
pthread_mutex_init(&file_mutex, NULL);
_3proxy_mutex_init(&file_mutex);
file_loaded = 1;
pl = pluginlink;
memcpy(&sso, pl->so, sizeof(struct sockfuncs));
+6 -6
View File
@@ -21,7 +21,7 @@ extern "C" {
static struct pluginlink * pl;
static pthread_mutex_t pcre_mutex;
static _3proxy_mutex_t pcre_mutex;
static struct filter pcre_first_filter = {
@@ -112,7 +112,7 @@ struct pcre_filter_data {
};
static void pcre_data_free(struct pcre_filter_data *pcrefd){
pthread_mutex_lock(&pcre_mutex);
_3proxy_mutex_lock(&pcre_mutex);
pcrefd->users--;
if(!pcrefd->users){
if(pcrefd->match_data) pcre2_match_data_free(pcrefd->match_data);
@@ -121,7 +121,7 @@ static void pcre_data_free(struct pcre_filter_data *pcrefd){
if(pcrefd->replace) pl->freefunc(pcrefd->replace);
pl->freefunc(pcrefd);
}
pthread_mutex_unlock(&pcre_mutex);
_3proxy_mutex_unlock(&pcre_mutex);
}
@@ -130,9 +130,9 @@ static void pcre_data_free(struct pcre_filter_data *pcrefd){
static void* pcre_filter_open(void * idata, struct srvparam * param){
#define pcrefd ((struct pcre_filter_data *)idata)
if(idata){
pthread_mutex_lock(&pcre_mutex);
_3proxy_mutex_lock(&pcre_mutex);
pcrefd->users++;
pthread_mutex_unlock(&pcre_mutex);
_3proxy_mutex_unlock(&pcre_mutex);
}
#undef pcrefd
return idata;
@@ -517,7 +517,7 @@ PLUGINAPI int PLUGINCALL pcre_plugin (struct pluginlink * pluginlink,
pcre_options = 0;
if(!pcre_loaded){
pcre_loaded = 1;
pthread_mutex_init(&pcre_mutex, NULL);
_3proxy_mutex_init(&pcre_mutex);
regexp_symbols[2].next = pl->symbols.next;
pl->symbols.next = regexp_symbols;
pcre_commandhandlers[3].next = pl->commandhandlers->next;
+4 -4
View File
@@ -12,7 +12,7 @@ Kirill Lopuchov <lopuchov@mail.ru>
#include <security/pam_appl.h>
pthread_mutex_t pam_mutex;
_3proxy_mutex_t pam_mutex;
static int already_loaded = 0;
@@ -89,7 +89,7 @@ static int pamfunc(struct clientparam *param)
/*start process auth */
conv.appdata_ptr = (char *) param->password;
pthread_mutex_lock(&pam_mutex);
_3proxy_mutex_lock(&pam_mutex);
if (!pamh)
{
retval = pam_start ((char *)service, (char *)param->username, &conv, &pamh);
@@ -113,7 +113,7 @@ static int pamfunc(struct clientparam *param)
retval = pam_end (pamh, retval);
if (retval != PAM_SUCCESS)
{ pamh = NULL; }
pthread_mutex_unlock(&pam_mutex);
_3proxy_mutex_unlock(&pam_mutex);
return rc;
@@ -140,7 +140,7 @@ PLUGINAPI int PLUGINCALL start(struct pluginlink * pluginlink, int argc, unsigne
already_loaded = 1;
pthread_mutex_init(&pam_mutex, NULL);
_3proxy_mutex_init(&pam_mutex);
pamauth.authenticate = pamfunc;
pamauth.authorize = pluginlink->checkACL;
pamauth.desc = "pam";
+8 -8
View File
@@ -32,7 +32,7 @@ typedef struct _ssl_conn {
SSL *ssl;
} ssl_conn;
pthread_mutex_t ssl_file_mutex;
_3proxy_mutex_t ssl_file_mutex;
static char errbuf[256];
@@ -229,15 +229,15 @@ void _ssl_cert_free(SSL_CERT cert)
/* This array will store all of the mutexes available to OpenSSL. */
static pthread_mutex_t *mutex_buf= NULL;
static _3proxy_mutex_t *mutex_buf= NULL;
static void locking_function(int mode, int n, const char * file, int line)
{
if (mode & CRYPTO_LOCK)
pthread_mutex_lock(mutex_buf + n);
_3proxy_mutex_lock(mutex_buf + n);
else
pthread_mutex_unlock(mutex_buf + n);
_3proxy_mutex_unlock(mutex_buf + n);
}
static unsigned long id_function(void)
@@ -253,11 +253,11 @@ int thread_setup(void)
{
int i;
mutex_buf = malloc(CRYPTO_num_locks( ) * sizeof(pthread_mutex_t));
mutex_buf = malloc(CRYPTO_num_locks( ) * sizeof(_3proxy_mutex_t));
if (!mutex_buf)
return 0;
for (i = 0; i < CRYPTO_num_locks( ); i++)
pthread_mutex_init(mutex_buf +i, NULL);
_3proxy_mutex_init(mutex_buf +i);
CRYPTO_set_id_callback(id_function);
CRYPTO_set_locking_callback(locking_function);
return 1;
@@ -272,7 +272,7 @@ int thread_cleanup(void)
CRYPTO_set_id_callback(NULL);
CRYPTO_set_locking_callback(NULL);
for (i = 0; i < CRYPTO_num_locks( ); i++)
pthread_mutex_destroy(mutex_buf +i);
_3proxy_mutex_destroy(mutex_buf +i);
free(mutex_buf);
mutex_buf = NULL;
return 1;
@@ -291,7 +291,7 @@ void ssl_init()
thread_setup();
SSLeay_add_ssl_algorithms();
SSL_load_error_strings();
pthread_mutex_init(&ssl_file_mutex, NULL);
_3proxy_mutex_init(&ssl_file_mutex);
bio_err=BIO_new_fp(stderr,BIO_NOCLOSE);
}
}