Skip to content

Commit 8526c85

Browse files
committed
Bluewing Server update to build 39
The edits that affect bluewing-cpp-server include: * IPv6 fixes for changing outgoing IPv6 address * Chance of Windows UDP corruption fixed (odds were more likely in server) * UDP size limit errors added * Windows socket startup checked * UDP no longer closes prematurely (this fixes a crash on disconnect/reconnect for Wine) * CG-NAT client support added * Unicode allowlist error report fixed * Fixed single-threaded channel close More details available in original commit SortaCore/MMF2Exts@a018f8e .
1 parent b4a1e20 commit 8526c85

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+5312
-2586
lines changed

Lacewing/CodePointAllowList.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
/* vim: set noet ts=4 sw=4 sts=4 ft=cpp:
22
*
33
* liblacewing and Lacewing Relay/Blue source code are available under MIT license.
4-
* Copyright (C) 2021-2022 Darkwire Software.
4+
* Copyright (C) 2021-2025 Darkwire Software.
55
* All rights reserved.
66
*
77
* https://opensource.org/licenses/mit-license.php
88
*/
99

1010
#include "Lacewing.h"
1111
#include "deps/utf8proc.h"
12+
#ifdef _MSC_VER
13+
// suppress complaints about utf8proc C enums not being C++ enum classes
14+
#pragma warning (push)
15+
#pragma warning (disable: 26812)
16+
#endif
1217

1318
static std::string CPALMakeError(lacewing::codepointsallowlist * that, lacewing::codepointsallowlist & acTemp, const char * str, ...)
1419
{
@@ -225,3 +230,7 @@ int lacewing::codepointsallowlist::checkcodepointsallowed(const std::string_view
225230

226231
return -1; // All good
227232
}
233+
234+
#ifdef _MSC_VER
235+
#pragma warning (pop)
236+
#endif

Lacewing/FrameBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* vim: set noet ts=4 sw=4 sts=4 ft=cpp:
22
*
33
* Copyright (C) 2011 James McLaughlin.
4-
* Copyright (C) 2012-2022 Darkwire Software.
4+
* Copyright (C) 2012-2025 Darkwire Software.
55
* All rights reserved.
66
*
77
* liblacewing and Lacewing Relay/Blue source code are available under MIT license.

Lacewing/FrameReader.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* vim: set noet ts=4 sw=4 sts=4 ft=cpp:
22
*
33
* Copyright (C) 2011 James McLaughlin.
4-
* Copyright (C) 2012-2022 Darkwire Software.
4+
* Copyright (C) 2012-2025 Darkwire Software.
55
* All rights reserved.
66
*
77
* liblacewing and Lacewing Relay/Blue source code are available under MIT license.
@@ -64,10 +64,10 @@ class framereader
6464
switch (buffer.size)
6565
{
6666
case 2:
67-
messagesize = *(lw_i16 *) buffer.buffer;
67+
messagesize = *(lw_ui16 *) buffer.buffer;
6868
break;
6969
case 4:
70-
messagesize = *(lw_i32 *) buffer.buffer;
70+
messagesize = *(lw_ui32 *) buffer.buffer;
7171
break;
7272
}
7373

Lacewing/IDPool.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
/* vim: set et ts=4 sw=4 sts=4 ft=cpp:
1+
/* vim: set noet ts=4 sw=4 sts=4 ft=cpp:
22
*
33
* Copyright (C) 2011 James McLaughlin.
4-
* Copyright (C) 2012-2022 Darkwire Software.
4+
* Copyright (C) 2012-2025 Darkwire Software.
55
* All rights reserved.
66
*
77
* liblacewing and Lacewing Relay/Blue source code are available under MIT license.
88
* https://opensource.org/licenses/mit-license.php
99
*/
10+
#include "src/common.h"
1011
#include <vector>
1112
#include <set>
1213

1314
#ifndef LacewingIDPool
1415
#define LacewingIDPool
1516

16-
/// <summary> An ID number list, ensures no duplicate IDs and lowest
17-
/// available ID numbers used first, etc. </summary>
17+
// An ID number list, ensures no duplicate IDs and lowest
18+
// available ID numbers used first, etc.
1819
class IDPool
1920
{
2021

@@ -27,21 +28,20 @@ class IDPool
2728

2829
public:
2930

30-
/// <summary> Creates an ID pool. First ID returned is 0. </summary>
31+
// Creates an ID pool. First ID returned is 0.
3132
IDPool()
3233
{
3334
nextID = 0;
3435
borrowedCount = 0;
3536
}
3637

37-
/// <summary> Gets the next ID available from the pool. </summary>
38-
/// <returns> New ID to use. </returns>
38+
// Gets the next ID available from the pool
3939
lw_ui16 borrow()
4040
{
4141
lacewing::writelock writeLock = lock.createWriteLock();
4242

4343
++borrowedCount;
44-
lw_trace("Borrowed Client ID. %i IDs borrowed so far.", borrowedCount);
44+
lwp_trace("Borrowed Client ID. %i IDs borrowed so far.", borrowedCount);
4545

4646
// More than can be stored in an ID list are in use. JIC.
4747
if (borrowedCount > 0xFFFE)
@@ -57,9 +57,8 @@ class IDPool
5757
return nextID ++;
5858
}
5959

60-
/// <summary> Returns the given identifier. </summary>
61-
/// <param name="ID"> The identifier to return. </param>
62-
void returnID(lw_ui16 ID)
60+
// Returns the given identifier back to the pool for re-use
61+
void returnID(const lw_ui16 ID)
6362
{
6463
lacewing::writelock writeLock = lock.createWriteLock();
6564
// No IDs in use at all: empty list

0 commit comments

Comments
 (0)