src/lte/model/rr-ff-mac-scheduler.cc
changeset 8413 3387abb7a77c
parent 8412 018034c10dec
child 8435 6b0542a91970
--- a/src/lte/model/rr-ff-mac-scheduler.cc	Fri Nov 25 19:45:06 2011 +0100
+++ b/src/lte/model/rr-ff-mac-scheduler.cc	Fri Nov 25 19:55:29 2011 +0100
@@ -321,9 +321,9 @@
 {
   NS_LOG_FUNCTION (this << params.m_rnti << (uint32_t) params.m_logicalChannelIdentity);
   // API generated by RLC for updating RLC parameters on a LC (tx and retx queues)
-  std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it;
+  std::list<FfMacSchedSapProvider::SchedDlRlcBufferReqParameters>::iterator it = m_rlcBufferReq.begin ();
   bool newLc = true;
-  for (it = m_rlcBufferReq.begin (); it != m_rlcBufferReq.end (); it++)
+  while (it != m_rlcBufferReq.end ())
     {
       // remove old entries of this UE-LC
       if (((*it).m_rnti == params.m_rnti)&&((*it).m_logicalChannelIdentity == params.m_logicalChannelIdentity))
@@ -331,6 +331,10 @@
           it = m_rlcBufferReq.erase (it);
           newLc = false;
         }
+      else
+        {
+          ++it;
+        }
     }
   // add the new parameters
   m_rlcBufferReq.insert (it, params);