Bugzilla – Full Text Bug Listing |
Summary: | UdpEchoClient::SetFill (uint8_t *fill, ...) do not set packet size attribute correctly | ||
---|---|---|---|
Product: | ns-3 | Reporter: | jesse1013000 |
Component: | applications | Assignee: | George Riley <riley> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ns-bugs, tomh |
Priority: | P5 | ||
Version: | ns-3.13 | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
UdpEchoClient::SetFill (uint8_t *fill, ...) patch
a test case for the patch |
Created attachment 1344 [details]
a test case for the patch
a test case for the patch
He's right. Either apply the patch or do the same with an else{} and the return removal. Tommaso fixed in changeset 7458a10a17d1 Thanks for providing a test case, which I added to the test suite. |
Created attachment 1343 [details] UdpEchoClient::SetFill (uint8_t *fill, ...) patch Function UdpEchoClient::SetFill (uint8_t *fill, uint32_t fillSize, uint32_t dataSize) do not set packet size attribute correctly. When "fillSize >= dataSize", m_size is not set. A solution is to add statement "m_size = dataSize " before statement "return" in "if (fillSize >= dataSize) { ...}" statement block. if (fillSize >= dataSize) { memcpy (m_data, fill, dataSize); m_size = dataSize; // Add this statement return; }