Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(200)

Unified Diff: src/internet-stack/ipv4-raw-socket-impl.cc

Issue 805044: IPv4RawSocket and UdpSocket returns wrong value after send (Closed)
Patch Set: Added RELEASE_NOTES Created 13 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « RELEASE_NOTES ('k') | src/internet-stack/udp-socket-impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/internet-stack/ipv4-raw-socket-impl.cc
===================================================================
--- a/src/internet-stack/ipv4-raw-socket-impl.cc
+++ b/src/internet-stack/ipv4-raw-socket-impl.cc
@@ -184,10 +184,14 @@
{
NS_LOG_LOGIC ("Route exists");
ipv4->Send (p, route->GetSource (), dst, m_protocol, route);
+ NotifyDataSent (p->GetSize ());
+ NotifySend (GetTxAvailable ());
+ return p->GetSize();
}
else
{
NS_LOG_DEBUG ("dropped because no outgoing route.");
+ return -1;
}
}
return 0;
@@ -221,6 +225,8 @@
}
struct Data data = m_recv.front ();
m_recv.pop_front ();
+ InetSocketAddress inet = InetSocketAddress (data.fromIp, data.fromProtocol);
+ fromAddress = inet;
if (data.packet->GetSize () > maxSize)
{
Ptr<Packet> first = data.packet->CreateFragment (0, maxSize);
@@ -228,8 +234,6 @@
m_recv.push_front (data);
return first;
}
- InetSocketAddress inet = InetSocketAddress (data.fromIp, data.fromProtocol);
- fromAddress = inet;
return data.packet;
}
« no previous file with comments | « RELEASE_NOTES ('k') | src/internet-stack/udp-socket-impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b