Skip to content

Commit e4d5de2

Browse files
committed
Tcp: add TODO to replace bool return with void + getFsmState() check
The process methods (processAppCommand, processTCPSegment, processIcmpv4Error, processIcmpv6Error) currently return bool to signal whether the connection moved to CLOSED. This could be simplified by making them void and having the Tcp module check conn->getFsmState() == TCP_S_CLOSED after each call instead.
1 parent cb90199 commit e4d5de2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • src/inet/transportlayer/tcp

src/inet/transportlayer/tcp/Tcp.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ void Tcp::handleUpperCommand(cMessage *msg)
104104
EV_INFO << "Tcp connection created for " << msg << "\n";
105105
}
106106

107+
// TODO replace bool return convention with void + conn->getFsmState() == TCP_S_CLOSED check
108+
// (applies to processAppCommand, processTCPSegment, processIcmpv4Error, processIcmpv6Error)
107109
if (!conn->processAppCommand(msg))
108110
removeConnection(conn);
109111
}

0 commit comments

Comments
 (0)