Fix valgrind error reported on Task #983
authorLluis Parcerisa <parcerisa@gmail.com>
Wed, 27 Mar 2013 17:10:58 +0100
changeset 10023 d0cec03b1409
parent 10022 4942b556f517
child 10024 07b1d791701f
Fix valgrind error reported on Task #983
src/lte/model/lte-rrc-sap.h
src/lte/model/lte-ue-rrc.cc
--- a/src/lte/model/lte-rrc-sap.h	Tue Mar 26 19:22:41 2013 +0100
+++ b/src/lte/model/lte-rrc-sap.h	Wed Mar 27 17:10:58 2013 +0100
@@ -44,9 +44,9 @@
  * ns-3 model are mentioned here. The naming of the variables that are
  * defined here is the same of 36.331, except for removal of "-" and
  * conversion to CamelCase or ALL_CAPS where needed in order to follow
- * the ns-3 coding style. Due to the 1-to-1 mapping with TS 36.311, 
+ * the ns-3 coding style. Due to the 1-to-1 mapping with TS 36.331, 
  * detailed doxygen documentation is omitted, so please refer to
- * 36.311 for the meaning of these data structures / fields.
+ * 36.331 for the meaning of these data structures / fields.
  * 
  */
 class LteRrcSap
@@ -232,7 +232,7 @@
     enum {eventA1,eventA2,eventA3,eventA4,eventA5} eventId;
     ThresholdEutra threshold1; // used for A1, A2, A4, A5
     ThresholdEutra threshold2; // used for A5
-    bool reportOnLeave;
+    bool reportOnLeave; // used for A3
     int8_t a3Offset; // used for A3
     uint8_t hysteresis;
     uint16_t timeToTrigger;
--- a/src/lte/model/lte-ue-rrc.cc	Tue Mar 26 19:22:41 2013 +0100
+++ b/src/lte/model/lte-ue-rrc.cc	Wed Mar 27 17:10:58 2013 +0100
@@ -770,10 +770,15 @@
             {
               measReportIt->second.cellsTriggeredList.erase (*it);
             }
-          if (reportConfigEutra.reportOnLeave)
+
+          // reportOnLeave will only be set when eventId = eventA3
+          if(reportConfigEutra.eventId == LteRrcSap::ReportConfigEutra::eventA3)
             {
-              initiateUeMeasurementReportingProcedure = true;
-            }          
+              if (reportConfigEutra.reportOnLeave)
+                {
+                  initiateUeMeasurementReportingProcedure = true;
+                }
+            }    
         }
 
       if (initiateUeMeasurementReportingProcedure)