Bug 769 - Queue::GetTotalReceived{Bytes,Packets}() broken
Queue::GetTotalReceived{Bytes,Packets}() broken
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: network
ns-3-dev
All All
: P5 normal
Assigned To: Craig Dowell
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-04 01:05 EST by Tom Henderson
Modified: 2010-01-05 15:28 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2009-12-04 01:05:59 EST
http://mailman.isi.edu/pipermail/ns-developers/2009-December/007144.html

--- src/node/queue_orig.cc	2009-12-03 19:38:11.000000000 +0100
+++ src/node/queue.cc	2009-12-03 19:38:38.000000000 +0100
@@ -69,8 +69,12 @@
   bool retval = DoEnqueue (p);
   if (retval)
     {
-      m_nBytes += p->GetSize ();
+      uint32_t size = p->GetSize ();
+      m_nBytes += size;
+      m_nTotalReceivedBytes += size;
+
       m_nPackets++;
+      m_nTotalReceivedPackets++;
     }
   return retval;
 }
Comment 1 Faker Moatamri 2009-12-04 10:40:20 EST
Craig, can you please take a look at this small patch and give it +1 or ask for corrections.
Thanks
Comment 2 Craig Dowell 2010-01-05 15:28:30 EST
Fixed changeset 5af362f6434a