do not generate zero-sized packets

This commit is contained in:
Mathieu Lacage
2007-02-19 10:52:04 +01:00
parent 3326fdba35
commit 6c7109309f

View File

@@ -44,7 +44,7 @@ GenerateTraffic (UdpSocket *socket, uint32_t size)
{
std::cout << "at=" << Simulator::Now ().GetSeconds () << "s, tx bytes=" << size << std::endl;
socket->SendDummy (size);
if (size > 0)
if (size > 50)
{
Simulator::Schedule (Seconds (0.5), &GenerateTraffic, socket, size - 50);
}