Bug 769

Summary: Queue::GetTotalReceived{Bytes,Packets}() broken
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: networkAssignee: Craig Dowell <craigdo>
Status: RESOLVED FIXED    
Severity: normal CC: faker.moatamri, ns-bugs
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Tom Henderson 2009-12-04 01:05:59 UTC
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 UTC
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 UTC
Fixed changeset 5af362f6434a