From a88ee6e26984bcd9389dc11607ec798cdb184e34 Mon Sep 17 00:00:00 2001 From: Eugene Chemeritskiy Date: Wed, 26 Mar 2014 23:20:13 +0100 Subject: [PATCH] Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer --- RELEASE_NOTES | 1 + src/applications/model/udp-trace-client.cc | 5 ++--- src/applications/model/udp-trace-client.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index f7b525c38..a62fa7f64 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -62,6 +62,7 @@ Bugs fixed - Bug 1882 - int64x64 tests trigger valgrind bug - Bug 1883 - IPv6 don't consider the prefix and network when choosing output address - Bug 1887 - Point-to-point traces should contain PPP headers +- Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer - Bug 1891 - UdpSocketImpl::GetSockName doesn't return the IPv6 address Release 3.19 diff --git a/src/applications/model/udp-trace-client.cc b/src/applications/model/udp-trace-client.cc index bb50ce0a6..08acea066 100644 --- a/src/applications/model/udp-trace-client.cc +++ b/src/applications/model/udp-trace-client.cc @@ -186,8 +186,7 @@ void UdpTraceClient::LoadTrace (std::string filename) { NS_LOG_FUNCTION (this << filename); - uint32_t time, index, prevTime = 0; - uint16_t size; + uint32_t time, index, size, prevTime = 0; char frameType; TraceEntry entry; std::ifstream ifTraceFile; @@ -327,7 +326,7 @@ UdpTraceClient::Send (void) struct TraceEntry *entry = &m_entries[m_currentEntry]; do { - for (int i = 0; i < entry->packetSize / m_maxPacketSize; i++) + for (uint32_t i = 0; i < entry->packetSize / m_maxPacketSize; i++) { SendPacket (m_maxPacketSize); } diff --git a/src/applications/model/udp-trace-client.h b/src/applications/model/udp-trace-client.h index a64dcf6fe..e3a601b35 100644 --- a/src/applications/model/udp-trace-client.h +++ b/src/applications/model/udp-trace-client.h @@ -150,7 +150,7 @@ private: struct TraceEntry { uint32_t timeToSend; //!< Time to send the frame - uint16_t packetSize; //!< Size of the frame + uint32_t packetSize; //!< Size of the frame char frameType; //!< Frame type (I, P or B) };