supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasupletel.cpp
branchRCL_3
changeset 44 2b4ea9893b66
parent 0 667063e416a2
child 45 6b6920c56e2f
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasupletel.cpp	Thu Aug 19 10:20:18 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasupletel.cpp	Tue Aug 31 15:37:04 2010 +0300
@@ -12,7 +12,7 @@
 * Contributors:
 *
 * Description:   Implementation of COMASuplEtel Class
-*  Version     : %version: 3 % << Don't touch! Updated by Synergy at check-out.
+*  Version     : %version: 5 % << Don't touch! Updated by Synergy at check-out.
 *
 */
 
@@ -205,38 +205,42 @@
             {
             case RMobilePhone::ENetworkModeGsm:
                 {
+            //coverity[alloc_fn]
+            //coverity[assign]
                 // For GSM Cell Information
                 COMASuplLocationId* locationId = COMASuplLocationId::NewL(); 
-                CleanupStack::PushL(locationId);
-     			COMASuplGSMCellInfo* gsmCellInfo = COMASuplGSMCellInfo::NewL();
-     			CleanupStack::PushL(gsmCellInfo);
-                COMASuplLocationId::TOMASuplStatus lStatus = COMASuplLocationId::ECurrent;
-               
-                TInt    MCC=0;
-                TInt64  MNC=0;
-                TUint   LAC, CellId;
-                TLex LexMCC(iNetworkInfo.iCountryCode);
-                TLex LexMNC(iNetworkInfo.iNetworkId);
+            //coverity[push]
+            CleanupStack::PushL(locationId);
+            COMASuplGSMCellInfo* gsmCellInfo = COMASuplGSMCellInfo::NewL();
+            CleanupStack::PushL(gsmCellInfo);
+            COMASuplLocationId::TOMASuplStatus lStatus =
+                    COMASuplLocationId::ECurrent;
+
+            TInt MCC = 0;
+            TInt64 MNC = 0;
+            TUint LAC, CellId;
+            TLex LexMCC(iNetworkInfo.iCountryCode);
+            TLex LexMNC(iNetworkInfo.iNetworkId);
 
                 LexMCC.Val(MCC);
                 LexMNC.Val(MNC);
                 LAC = iLocationInfo.iLocationAreaCode;
                 CellId = iLocationInfo.iCellId;
-                
-                                
-                gsmCellInfo->SetSuplGSMCellInfo(MNC, MCC,CellId,LAC);                
-                locationId->SetSuplLocationId(gsmCellInfo,lStatus);
-                CleanupStack::Pop(gsmCellInfo);
-                CleanupStack::Pop(locationId); 
-                
-        		#if defined(_DEBUG)  //This is only for logging purpose. 
-				TBuf<128> msg;
-				
-				msg.Copy(_L("It is GSM Network. MCC = "));					
-				msg.AppendNum(MCC);
-				
-				msg.Append(_L(" MNC = "));					
-				msg.AppendNum(MNC);
+
+            gsmCellInfo->SetSuplGSMCellInfo(MNC, MCC, CellId, LAC);
+            locationId->SetSuplLocationId(gsmCellInfo, lStatus);
+            CleanupStack::Pop(gsmCellInfo);
+            //coverity[pop]
+            CleanupStack::Pop(locationId);
+
+#if defined(_DEBUG)  //This is only for logging purpose. 
+            TBuf<128> msg;
+
+            msg.Copy(_L("It is GSM Network. MCC = "));
+            msg.AppendNum(MCC);
+
+            msg.Append(_L(" MNC = "));
+            msg.AppendNum(MNC);
 
 
 				msg.Append(_L(" CellId = "));					
@@ -253,22 +257,28 @@
 				    iObserver.LocationIDRequestCompletedL(locationId,KErrNone);
 				else if(iCellMode == EOMASuplCompareCellId)
 				    iObserver.ComparisionLocationIDRequestCompletedL(locationId,KErrNone);
+            //coverity[memory_leak]
                 break;                             
                 }                    
             case RMobilePhone::ENetworkModeWcdma:
                 {
+            //coverity[alloc_fn]
+            //coverity[assign]
                 // For WCDMA  Cell Information
                 COMASuplLocationId* locationId = COMASuplLocationId::NewL(); 
-                CleanupStack::PushL(locationId);
-     			COMASuplCellInfo* wcdmaCellInfo = COMASuplCellInfo::NewL();
-     			CleanupStack::PushL(wcdmaCellInfo);
-     			
-                COMASuplLocationId::TOMASuplStatus lStatus = COMASuplLocationId::ECurrent;
-                TInt    MCC=0;
-                TInt64  MNC=0;
-                TUint   UC;
-                TLex LexMCC(iNetworkInfo.iCountryCode);
-                TLex LexMNC(iNetworkInfo.iNetworkId);
+            //coverity[push]
+            CleanupStack::PushL(locationId);
+            
+            COMASuplCellInfo* wcdmaCellInfo = COMASuplCellInfo::NewL();
+            CleanupStack::PushL(wcdmaCellInfo);
+
+            COMASuplLocationId::TOMASuplStatus lStatus =
+                    COMASuplLocationId::ECurrent;
+            TInt MCC = 0;
+            TInt64 MNC = 0;
+            TUint UC;
+            TLex LexMCC(iNetworkInfo.iCountryCode);
+            TLex LexMNC(iNetworkInfo.iNetworkId);
 
                 LexMCC.Val(MCC);
                 LexMNC.Val(MNC);
@@ -278,6 +288,7 @@
                 wcdmaCellInfo->SetSuplCellInfo(MNC, MCC, UC);                
                 locationId->SetSuplLocationId(wcdmaCellInfo,lStatus);
                 CleanupStack::Pop(wcdmaCellInfo);
+            //coverity[pop]
                 CleanupStack::Pop(locationId);
                 
            		#if defined(_DEBUG)  //This is only for logging purpose. 
@@ -289,34 +300,38 @@
 				msg.Append(_L(" MNC = "));					
 				msg.AppendNum(MNC);
 
+            msg.Append(_L(" UC = "));
+            msg.AppendNum(UC);
 
-				msg.Append(_L(" UC = "));					
-				msg.AppendNum(UC);
-				
-				iTrace->Trace(msg,KTraceFileName, __LINE__); 							
-        		#endif
+            iTrace->Trace(msg, KTraceFileName, __LINE__);
+#endif
 
 				if(iCellMode == EOMASuplCellId)
 				    iObserver.LocationIDRequestCompletedL(locationId,KErrNone);
 				else if(iCellMode == EOMASuplCompareCellId)
 				    iObserver.ComparisionLocationIDRequestCompletedL(locationId,KErrNone);
+            //coverity[memory_leak]
                 break;                             
                 }                    
             default:            
             	{
             	#if _DEBUG 
+            //coverity[alloc_fn]
+            //coverity[assign]            
 	            	// For GSM Cell Information
 	            	COMASuplLocationId* locationId = COMASuplLocationId::NewL(); 
-                	CleanupStack::PushL(locationId);
-     				COMASuplGSMCellInfo* gsmCellInfo = COMASuplGSMCellInfo::NewL();
-     				CleanupStack::PushL(gsmCellInfo);
-     				
-	                COMASuplLocationId::TOMASuplStatus lStatus = COMASuplLocationId::ECurrent;
-	                TInt    MCC=0;
-	                TInt64  MNC=0;
-	                TUint   LAC, CellId;
-	                TLex LexMCC(iNetworkInfo.iCountryCode);
-	                TLex LexMNC(iNetworkInfo.iNetworkId);
+            //coverity[push]
+            CleanupStack::PushL(locationId);
+            
+            COMASuplGSMCellInfo* gsmCellInfo = COMASuplGSMCellInfo::NewL();
+            CleanupStack::PushL(gsmCellInfo);
+
+            COMASuplLocationId::TOMASuplStatus lStatus = COMASuplLocationId::ECurrent;
+            TInt MCC=0;
+            TInt64 MNC=0;
+            TUint LAC, CellId;
+            TLex LexMCC(iNetworkInfo.iCountryCode);
+            TLex LexMNC(iNetworkInfo.iNetworkId);
 
 	                LexMCC.Val(MCC);
 	                LexMNC.Val(MNC);
@@ -327,7 +342,8 @@
 	           		gsmCellInfo->SetSuplGSMCellInfo(MNC, MCC,CellId,LAC);                
 	                locationId->SetSuplLocationId(gsmCellInfo,lStatus);
 	                CleanupStack::Pop(gsmCellInfo);
-                	CleanupStack::Pop(locationId);  
+            //coverity[pop]
+            CleanupStack::Pop(locationId);
                 	
 					#if defined(_DEBUG)  //This is only for logging purpose. 
 					TBuf<128> msg;
@@ -357,7 +373,8 @@
                 	else if(iCellMode == EOMASuplCompareCellId)
                 	    iObserver.ComparisionLocationIDRequestCompletedL(NULL,KErrNotSupported);                 	
                 #endif
-                break;        	
+            //coverity[memory_leak]
+            break;
             	}                     
             }
 		
@@ -524,7 +541,7 @@
 	 				
 						for(TInt k = 0; k < KOMASUPLMaxTimeSlotIscpAmount; k++ )	 				
 							{
-								iOMASuplwcdmaCellInfo.iNwkMeasureReport[i].iCellMeasuredResult[j].iTddInfo.iTimeslotISCP[k] = iOMASuplwcdmaCellInfo.iNwkMeasureReport[i].iCellMeasuredResult[j].iTddInfo.iTimeslotISCP[k];
+								iOMASuplwcdmaCellInfo.iNwkMeasureReport[i].iCellMeasuredResult[j].iTddInfo.iTimeslotISCP[k] = iCustomWCDMACellInfo.iNwkMeasureReport[i].iCellMeasuredResult[j].iTddInfo.iTimeslotISCP[k];
 							}
 	 					
 	 			}