Fix bug 168: Socket::SendTo does not return the number of bytes sent for udp sockets.
1.1 --- a/src/internet-node/udp-socket.cc Mon Apr 14 17:12:52 2008 -0700
1.2 +++ b/src/internet-node/udp-socket.cc Tue Apr 15 09:41:58 2008 -0700
1.3 @@ -300,6 +300,7 @@
1.4 NotifyDataSent (p->GetSize ());
1.5 }
1.6 NS_LOG_LOGIC ("Limited broadcast end.");
1.7 + return p->GetSize();
1.8 }
1.9 else if (ipv4->GetIfIndexForDestination(dest, localIfIndex))
1.10 {
1.11 @@ -307,7 +308,7 @@
1.12 m_udp->Send (p, ipv4->GetAddress (localIfIndex), dest,
1.13 m_endPoint->GetLocalPort (), port);
1.14 NotifyDataSent (p->GetSize ());
1.15 - return 0;
1.16 + return p->GetSize();;
1.17 }
1.18 else
1.19 {