Bug 1890 - UdpClientTrace: MPEG frame size is squeezed into (insufficient) 16 bit integer
--- a/RELEASE_NOTES Wed Mar 26 23:08:28 2014 +0100
+++ b/RELEASE_NOTES Wed Mar 26 23:20:13 2014 +0100
@@ -62,6 +62,7 @@
- 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
--- a/src/applications/model/udp-trace-client.cc Wed Mar 26 23:08:28 2014 +0100
+++ b/src/applications/model/udp-trace-client.cc Wed Mar 26 23:20:13 2014 +0100
@@ -186,8 +186,7 @@
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 @@
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);
}
--- a/src/applications/model/udp-trace-client.h Wed Mar 26 23:08:28 2014 +0100
+++ b/src/applications/model/udp-trace-client.h Wed Mar 26 23:20:13 2014 +0100
@@ -150,7 +150,7 @@
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)
};