Bug 2425

Summary: UdpSocketImpl simplification
Product: ns-3 Reporter: Tommaso Pecorella <tommaso.pecorella>
Component: internetAssignee: Tommaso Pecorella <tommaso.pecorella>
Status: RESOLVED FIXED    
Severity: enhancement CC: ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Tommaso Pecorella 2016-05-27 18:36:22 UTC
Signalled by Stefano Avallone.

The member function UdpSocketImpl::DoSendTo (Ptr<Packet> p, Address dad) is useless, as it is nothing more than a if-else switch.

Due to how and when it is called, one of the switches is not reachable - the simulation would hit an assert before.
The second one can be easily moved in the caller function (not plural).

Eliminating the function would result into a more streamlined function call.

Moreover, since the function is private, there's no harm in changing the class implementation.
Comment 1 Tommaso Pecorella 2016-05-27 19:09:14 UTC
changeset 12137:a81ae23fc7e0