mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-03-10 18:29:18 +03:00
Compare commits
12 Commits
copilot/fi
...
9d27b935b7
| Author | SHA1 | Date | |
|---|---|---|---|
| 9d27b935b7 | |||
| 1e1104d3ba | |||
| 074efb5479 | |||
| fe460de5a6 | |||
| 6ef941db21 | |||
| d7d3ec8cac | |||
| 68e9f0b593 | |||
| f1012da5fb | |||
| 1411d4ceb4 | |||
| a3176175f9 | |||
| 88af7986b4 | |||
| 38f102e2e7 |
@ -4761,7 +4761,7 @@ static void MY_SHA0_Transform(MY_SHA0_CTX* ctx) {
|
|||||||
UCHAR* p = ctx->buf;
|
UCHAR* p = ctx->buf;
|
||||||
int t;
|
int t;
|
||||||
for(t = 0; t < 16; ++t) {
|
for(t = 0; t < 16; ++t) {
|
||||||
UINT tmp = *p++ << 24;
|
UINT tmp = (UINT)*p++ << 24;
|
||||||
tmp |= *p++ << 16;
|
tmp |= *p++ << 16;
|
||||||
tmp |= *p++ << 8;
|
tmp |= *p++ << 8;
|
||||||
tmp |= *p++;
|
tmp |= *p++;
|
||||||
|
|||||||
@ -63,7 +63,7 @@ static int ydays[] =
|
|||||||
0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
|
0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
|
||||||
};
|
};
|
||||||
|
|
||||||
static UINT current_num_thread = 0;
|
static COUNTER *current_num_thread = NULL;
|
||||||
static UINT cached_number_of_cpus = 0;
|
static UINT cached_number_of_cpus = 0;
|
||||||
|
|
||||||
|
|
||||||
@ -776,6 +776,7 @@ void InitThreading()
|
|||||||
{
|
{
|
||||||
thread_pool = NewSk();
|
thread_pool = NewSk();
|
||||||
thread_count = NewCounter();
|
thread_count = NewCounter();
|
||||||
|
current_num_thread = NewCounter();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release of thread pool
|
// Release of thread pool
|
||||||
@ -821,6 +822,9 @@ void FreeThreading()
|
|||||||
|
|
||||||
DeleteCounter(thread_count);
|
DeleteCounter(thread_count);
|
||||||
thread_count = NULL;
|
thread_count = NULL;
|
||||||
|
|
||||||
|
DeleteCounter(current_num_thread);
|
||||||
|
current_num_thread = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thread pool procedure
|
// Thread pool procedure
|
||||||
@ -1028,9 +1032,9 @@ THREAD *NewThreadNamed(THREAD_PROC *thread_proc, void *param, char *name)
|
|||||||
|
|
||||||
Wait(pd->InitFinishEvent, INFINITE);
|
Wait(pd->InitFinishEvent, INFINITE);
|
||||||
|
|
||||||
current_num_thread++;
|
Inc(current_num_thread);
|
||||||
|
|
||||||
// Debug("current_num_thread = %u\n", current_num_thread);
|
// Debug("current_num_thread = %u\n", Count(current_num_thread));
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -1055,8 +1059,8 @@ void CleanupThread(THREAD *t)
|
|||||||
|
|
||||||
Free(t);
|
Free(t);
|
||||||
|
|
||||||
current_num_thread--;
|
Dec(current_num_thread);
|
||||||
//Debug("current_num_thread = %u\n", current_num_thread);
|
//Debug("current_num_thread = %u\n", Count(current_num_thread));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Release thread (pool)
|
// Release thread (pool)
|
||||||
|
|||||||
@ -470,6 +470,7 @@ LIST *LoadLangList()
|
|||||||
b = ReadDump(filename);
|
b = ReadDump(filename);
|
||||||
if (b == NULL)
|
if (b == NULL)
|
||||||
{
|
{
|
||||||
|
FreeLangList(o);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -139,6 +139,7 @@ void Tick64Thread(THREAD *thread, void *param)
|
|||||||
{
|
{
|
||||||
UINT tick;
|
UINT tick;
|
||||||
UINT64 tick64;
|
UINT64 tick64;
|
||||||
|
bool halt;
|
||||||
|
|
||||||
#ifndef OS_WIN32
|
#ifndef OS_WIN32
|
||||||
tick = TickRealtime(); // Get the current system clock
|
tick = TickRealtime(); // Get the current system clock
|
||||||
@ -228,7 +229,13 @@ void Tick64Thread(THREAD *thread, void *param)
|
|||||||
n = 0;
|
n = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tk64->Halt)
|
Lock(tk64->TickLock);
|
||||||
|
{
|
||||||
|
halt = tk64->Halt;
|
||||||
|
}
|
||||||
|
Unlock(tk64->TickLock);
|
||||||
|
|
||||||
|
if (halt)
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -286,7 +293,11 @@ void FreeTick64()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Termination process
|
// Termination process
|
||||||
|
Lock(tk64->TickLock);
|
||||||
|
{
|
||||||
tk64->Halt = true;
|
tk64->Halt = true;
|
||||||
|
}
|
||||||
|
Unlock(tk64->TickLock);
|
||||||
Set(halt_tick_event);
|
Set(halt_tick_event);
|
||||||
WaitThread(tk64->Thread, INFINITE);
|
WaitThread(tk64->Thread, INFINITE);
|
||||||
ReleaseThread(tk64->Thread);
|
ReleaseThread(tk64->Thread);
|
||||||
|
|||||||
@ -2140,9 +2140,13 @@ void UnixMemoryFree(void *addr)
|
|||||||
// SIGCHLD handler
|
// SIGCHLD handler
|
||||||
void UnixSigChldHandler(int sig)
|
void UnixSigChldHandler(int sig)
|
||||||
{
|
{
|
||||||
|
int old_errno = errno;
|
||||||
|
|
||||||
// Recall the zombie processes
|
// Recall the zombie processes
|
||||||
while (waitpid(-1, NULL, WNOHANG) > 0);
|
while (waitpid(-1, NULL, WNOHANG) > 0);
|
||||||
signal(SIGCHLD, UnixSigChldHandler);
|
signal(SIGCHLD, UnixSigChldHandler);
|
||||||
|
|
||||||
|
errno = old_errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Disable core dump
|
// Disable core dump
|
||||||
|
|||||||
669
src/bin/hamcore/wwwroot/admin/default/package-lock.json
generated
669
src/bin/hamcore/wwwroot/admin/default/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user