Fix bug 168: Socket::SendTo does not return the number of bytes sent for udp sockets.

This commit is contained in:
Liu Jian committed 2008-04-15 09:41:58 -07:00
1 parent 8a32b1e369
commit 61375f8ef5
1 file changed
+2 -1
+2 -1
View File
@@ -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
{