echoDelay in TcpEchoApp causes a bug
I'm running General in examples/inet/tcpapp/omnetpp.ini and I'm running into a bug. I changed the application type on the server side to TcpEchoApp and added the echoDelay parameter to it. The ini is as followed.
> General
> network = TcpAppExample
> #abstract-config = true (requires omnet 7)
> *. *.numApps = 1
> *.client.app[0].typename = “TcpClientApp”
> *. client.app[0].io.connectAddress = “server”
> *.client.app[0].io.connectPort = 1000
> *.client.app[0].source.productionInterval = uniform(0s, 20s)
> *.client.app[0].source.packetLength = intuniform(100B, 200B)
> *.client.app[0].source.packetData = intuniform(0, 1)
>
> #*.server.app[0].typename = “TcpServerApp”
>
> *.server.app[0].typename = “TcpEchoApp”
> *.server.app[0].echoDelay = 200us
> *.server.app[0].listener.localPort = 1000
Then the following error is reported in the run.
I looked at the source code and when echoDelay is set, it uses the schedulerAfter function and then reports an error in the csimplemodule.cc file because msg->getOwner()! =this
But I still don't understand the reason. How can I fix this bug?
Usually it means some method on the stack lacks an Enter_Method() macro to switch the context from one module to the other.
The issue has already been resolved in the inet master branch. A separate fix has now been implemented for the inet v4.5.x branch.