Bug 180 - Minor Error in UDP Echo Apps
Minor Error in UDP Echo Apps
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: samples
pre-release
All All
: P4 minor
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-16 04:02 UTC by Joe Kopena
Modified: 2008-07-01 13:32 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Kopena 2008-05-16 04:02:26 UTC
UDPEchoClient::StopApplication, line 116, the "if (!m_socket)" should not be negated (looks copy & pasted from setup code).

Ditto UDPEchoServer::StopApplication, line 90.

The other applications seem fine.

Thx
Comment 1 Mathieu Lacage 2008-05-16 09:55:58 UTC
Generally, the code should be written as if (m_socket != 0) to avoid this kind of problem. i.e., avoid relying on implicit conversions.