|
From: <cn...@us...> - 2023-03-15 18:24:52
|
Revision: 1346
http://sourceforge.net/p/seq/svn/1346
Author: cn187
Date: 2023-03-15 18:24:47 +0000 (Wed, 15 Mar 2023)
Log Message:
-----------
Only check disconnected sessionId when session tracking is enabled
Modified Paths:
--------------
showeq/trunk/src/packetstream.cpp
Modified: showeq/trunk/src/packetstream.cpp
===================================================================
--- showeq/trunk/src/packetstream.cpp 2023-03-15 18:24:39 UTC (rev 1345)
+++ showeq/trunk/src/packetstream.cpp 2023-03-15 18:24:47 UTC (rev 1346)
@@ -1144,17 +1144,16 @@
break;
case OP_SessionDisconnect:
{
-
- // When session tracking isn't enabled, random UDP traffic on the LAN can
- // cause unexpected session disconnects if the packet payload happens
- // to start with the same bytes as the OP_SessionDisconnect netOp.
- //
- // So check the sessionId in the disconnect packet, and only process
- // it if it matches the current sessionId.
- SessionDisconnectStruct* disconnect = (SessionDisconnectStruct*) packet.payload();
- uint32_t disconnectedSessionId = eqntohuint32((uint8_t*)&(disconnect->sessionId));
- if (m_sessionId != disconnectedSessionId) {
- break;
+ if (m_session_tracking_enabled)
+ {
+ // Check the sessionId in the disconnect packet, and only process
+ // it if it matches the current sessionId.
+ SessionDisconnectStruct* disconnect = (SessionDisconnectStruct*) packet.payload();
+ uint32_t disconnectedSessionId = eqntohuint32((uint8_t*)&(disconnect->sessionId));
+ if (m_sessionId != disconnectedSessionId)
+ {
+ break;
+ }
}
#if defined(PACKET_PROCESS_DIAG) || defined(PACKET_SESSION_DIAG)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|