src/lte/model/lte-ue-mac.cc
changeset 8729 74de12409ee5
parent 8726 f6f0e2531457
child 8761 8675a3948f7c
--- a/src/lte/model/lte-ue-mac.cc	Wed Apr 25 15:57:29 2012 +0200
+++ b/src/lte/model/lte-ue-mac.cc	Wed Apr 25 17:36:25 2012 +0200
@@ -388,8 +388,15 @@
           if (itBsr!=m_ulBsrReceived.end ())
             {
               NS_LOG_FUNCTION (this << "\t" << dci.m_tbSize / m_macSapUserMap.size () << " bytes to LC " << (uint16_t)(*it).first << " queue " << (*itBsr).second);
-              (*it).second->NotifyTxOpportunity (dci.m_tbSize / activeLcs, 0); // UE works only in SISO mode
-              (*itBsr).second -= dci.m_tbSize / activeLcs;
+              (*it).second->NotifyTxOpportunity (dci.m_tbSize / activeLcs, 0);
+              if ((*itBsr).second >=  dci.m_tbSize / activeLcs)
+                {
+                  (*itBsr).second -= dci.m_tbSize / activeLcs;
+                }
+              else
+                {
+                  (*itBsr).second = 0;
+                }
             }
         }