mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2026-10-22 01:51:20 +03:00
v4.17-9562-beta
This commit is contained in:
1 parent
7785c41f38
commit
ff49706373
1114 files changed
+32910
-1551
No files matched your search
+17
-4
@@ -213,6 +213,12 @@ void NeoWrite(void *buf)
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Paused)
|
||||
{
|
||||
// Paused
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctx->Opened == FALSE)
|
||||
{
|
||||
// Not connected
|
||||
@@ -424,10 +430,14 @@ void NeoInitPacketQueue()
|
||||
}
|
||||
|
||||
// Delete all the packets from the packet queue
|
||||
void NeoClearPacketQueue()
|
||||
void NeoClearPacketQueue(bool no_lock)
|
||||
{
|
||||
// Release the memory of the packet queue
|
||||
NeoLock(ctx->PacketQueueLock);
|
||||
if (no_lock == false)
|
||||
{
|
||||
NeoLock(ctx->PacketQueueLock);
|
||||
}
|
||||
if (true)
|
||||
{
|
||||
NEO_QUEUE *q = ctx->PacketQueue;
|
||||
NEO_QUEUE *qn;
|
||||
@@ -442,14 +452,17 @@ void NeoClearPacketQueue()
|
||||
ctx->Tail = NULL;
|
||||
ctx->NumPacketQueue = 0;
|
||||
}
|
||||
NeoUnlock(ctx->PacketQueueLock);
|
||||
if (no_lock == false)
|
||||
{
|
||||
NeoUnlock(ctx->PacketQueueLock);
|
||||
}
|
||||
}
|
||||
|
||||
// Release the packet queue
|
||||
void NeoFreePacketQueue()
|
||||
{
|
||||
// Delete all packets
|
||||
NeoClearPacketQueue();
|
||||
NeoClearPacketQueue(false);
|
||||
|
||||
// Delete the lock
|
||||
NeoFreeLock(ctx->PacketQueueLock);
|
||||
|
||||
Reference in new issue
Block a user