You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NetworkLog(ELogVerbosity::LOG_RELEASE, "[AC PACKET] Dropping malformed AC packet - size %u is less than header size 3 from user %lld", numBytes, static_cast<longlong>(m_userID));
NetworkLog(ELogVerbosity::LOG_RELEASE, "[AC PACKET] Dropping malformed AC packet - size %u is less than header size 3 from user %lld", numBytes, static_cast<longlong>(m_userID));
1217
+
NetworkLog(ELogVerbosity::LOG_RELEASE, "[AC PACKET] Dropping malformed AC packet - size %u is less than header size from user %lld", numBytes, static_cast<longlong>(m_userID));
1188
1218
msg->Release();
1189
1219
continue;
1190
1220
}
1221
+
#endif
1191
1222
1192
1223
// not an AC packet, we dont care
1193
1224
NetworkLog(ELogVerbosity::LOG_DEBUG, "[AC PACKET] Received NON AC message");
@@ -1261,6 +1292,12 @@ int PlayerConnection::SendGamePacket(void* pBuffer, uint32_t totalDataSize)
1261
1292
}
1262
1293
}
1263
1294
1295
+
#ifdef NGMP_COMPAT_OLD_CHANNEL_PROTOCOL
1296
+
// TODO(PS_PATH): Old protocol compat — send game packets raw, no channel header
1297
+
NetworkLog(ELogVerbosity::LOG_DEBUG, "[GAME PACKET] Sending msg of size %ld to user %lld\n", totalDataSize, m_userID);
1298
+
EResult r = SteamNetworkingSockets()->SendMessageToConnection(
// all packets must have at least 1 byte to indicate channel
152
+
#ifdef NGMP_COMPAT_OLD_CHANNEL_PROTOCOL
153
+
// TODO(PS_PATH): Old protocol compat — 3-byte AC header [9,1,2], game packets have no channel header
154
+
if (numBytesWithHeader >= 3)
155
+
{
156
+
BYTE b1 = (BYTE)vecDataWithHeader[0];
157
+
BYTE b2 = (BYTE)vecDataWithHeader[1];
158
+
BYTE b3 = (BYTE)vecDataWithHeader[2];
159
+
if (b1 == 9 && b2 == 1 && b3 == 2)
160
+
{
161
+
NetworkLog(ELogVerbosity::LOG_RELEASE,"[AC PACKET] Received AC message of size %u from user %lld", numBytesWithHeader, static_cast<longlong>(kvPair.second.m_userID));
NetworkLog(ELogVerbosity::LOG_RELEASE, "[AC PACKET] Dropping malformed AC packet - size %u is less than header size 3 from user %lld", numBytesWithHeader, static_cast<longlong>(kvPair.second.m_userID));
175
+
msg->Release();
176
+
continue;
177
+
}
178
+
179
+
// Not AC — treat as raw game packet (no channel header to strip)
180
+
{
181
+
constuint32_t numBytes = numBytesWithHeader;
182
+
183
+
NetworkLog(ELogVerbosity::LOG_DEBUG,
184
+
"[GAME PACKET] Received message of size %u from user %lld",
DEBUG_INFO_MAC(("[NET_RECV] DROP: not a generals packet, size=%u from uid=%lld", vecPacketDataWithoutHeader.size(), (longlong)kvPair.second.m_userID));
344
+
DEBUG_INFO_MAC(("[NET_RECV] DROP: not a generals packet, size=%u from uid=%lld", numBytesWithHeader, (longlong)kvPair.second.m_userID));
258
345
// Check if it's a CRC failure or magic number failure to help diagnose corruption
259
346
if (incomingMessage.header.magic != GENERALS_MAGIC_NUMBER)
0 commit comments