src/lte/model/lte-ue-phy.cc
changeset 9642 18322d968b54
parent 9636 91e31f0e569c
child 9653 382d27da8905
child 9685 e2d696385b5e
child 9983 0091ab7a897c
--- a/src/lte/model/lte-ue-phy.cc	Fri Jan 25 13:58:23 2013 +0100
+++ b/src/lte/model/lte-ue-phy.cc	Fri Jan 25 15:32:33 2013 +0100
@@ -398,7 +398,10 @@
     {
       Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> ();
       Ptr<DlCqiLteControlMessage> msg = CreateDlCqiFeedbackMessage (sinr);
-      DoSendLteControlMessage (msg);
+      if (msg)
+        {
+          DoSendLteControlMessage (msg);
+        }
       m_p10CqiLast = Simulator::Now ();
     }
   // check aperiodic high-layer configured subband CQI
@@ -406,7 +409,10 @@
     {
       Ptr<LteUeNetDevice> thisDevice = GetDevice ()->GetObject<LteUeNetDevice> ();
       Ptr<DlCqiLteControlMessage> msg = CreateDlCqiFeedbackMessage (sinr);
-      DoSendLteControlMessage (msg);
+      if (msg)
+        {
+          DoSendLteControlMessage (msg);
+        }
       m_a30CqiLast = Simulator::Now ();
     }
 }
@@ -437,6 +443,12 @@
 LteUePhy::CreateDlCqiFeedbackMessage (const SpectrumValue& sinr)
 {
   NS_LOG_FUNCTION (this);
+
+  if (m_rnti == 0)
+    {
+      // abort method, the UE is still not registered
+      return (0);
+    }
   
   // apply transmission mode gain
   NS_ASSERT (m_transmissionMode < m_txModeGain.size ());