Fix bug 168: Socket::SendTo does not return the number of bytes sent for udp sockets.
This commit is contained in:
1 parent
8a32b1e369
commit
61375f8ef5
1 file changed
+2
-1
@@ -300,6 +300,7 @@ UdpSocket::DoSendTo (Ptr<Packet> p, Ipv4Address dest, uint16_t port)
|
||||
NotifyDataSent (p->GetSize ());
|
||||
}
|
||||
NS_LOG_LOGIC ("Limited broadcast end.");
|
||||
return p->GetSize();
|
||||
}
|
||||
else if (ipv4->GetIfIndexForDestination(dest, localIfIndex))
|
||||
{
|
||||
@@ -307,7 +308,7 @@ UdpSocket::DoSendTo (Ptr<Packet> p, Ipv4Address dest, uint16_t port)
|
||||
m_udp->Send (p, ipv4->GetAddress (localIfIndex), dest,
|
||||
m_endPoint->GetLocalPort (), port);
|
||||
NotifyDataSent (p->GetSize ());
|
||||
return 0;
|
||||
return p->GetSize();;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user