locationtriggering/ltcellidmovementdetector/src/lbtcellidmvmtdet.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 0 667063e416a2
child 45 6b6920c56e2f
--- a/locationtriggering/ltcellidmovementdetector/src/lbtcellidmvmtdet.cpp	Thu Aug 19 10:20:18 2010 +0300
+++ b/locationtriggering/ltcellidmovementdetector/src/lbtcellidmvmtdet.cpp	Tue Aug 31 15:37:04 2010 +0300
@@ -239,7 +239,11 @@
                 TReal ed = 0.0;
                 if( KErrNotFound != ComputeED( ed, cellInfo, iPrevCellInfo ) )
                     {
-                    iED.Append( ed );
+                    TInt error = iED.Append( ed );
+                    if( error != KErrNone )
+                        {
+                        LOG1("Failed to append ed to the array:%d",error);
+                        }
                     iSumOfED += ed;
                     if( iED.Count() == 5 )
                         {
@@ -373,8 +377,16 @@
         return ETrue;
         }
         
-    iSumOfSd.Append( sumOfSd );
-    iVarianceOfRssi.Append( aCarrierRSSISD );
+    TInt error = iSumOfSd.Append( sumOfSd );
+    if( error != KErrNone )
+        {
+        LOG1("Append sumOfSd to the array:%d",error);
+        }
+    error = iVarianceOfRssi.Append( aCarrierRSSISD );
+    if( error != KErrNone )
+        {
+        LOG1("Append aCarrierRSSISD to the array:%d",error);
+        }
     if( iSumOfSd.Count() == 3 )
         {
         TReal sumAvg = 0.0;
@@ -489,8 +501,16 @@
             TInt diff = 
                 ( ( aPrevCellInfo->GetNMR() )[pos].RxLEV ) - ( nmr.RxLEV );
             Math::Pow( diffSqr, diff, 2 );
-            diffArray.Append( diffSqr );
-            posArray.Append( pos );
+            TInt error = diffArray.Append( diffSqr );
+            if( error != KErrNone )
+                {
+                LOG1("Failed to append to diff array:%d",error);
+                }
+            error = posArray.Append( pos );
+            if( error !=KErrNone )
+                {
+                LOG1("Failed to append to pos array:%d",error);
+                }
             }
         else
             {
@@ -556,7 +576,12 @@
 
     iED.Reset();
     TReal variance = sum / 5;
-    iVarianceOfED.Append( variance );
+    TInt error = iVarianceOfED.Append( variance );
+    if( error != KErrNone )
+        {
+        LOG1("Failed to append variance:%d",error);
+        }
+    
     
     // Check if variance is > 5. If true then check the next set of
     // 5 variances. If there are more than two variance readings > 5