satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp
branchRCL_3
changeset 9 71e7b994dff4
parent 7 a19c8664496d
child 11 586d88ba9aa1
--- a/satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp	Wed Apr 14 16:32:24 2010 +0300
+++ b/satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp	Tue Apr 27 17:13:17 2010 +0300
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -18,6 +18,7 @@
 
 #include    <CPhCltUssdSatClient.h>
 #include	<CPhCltUssd.h>
+#include    <exterror.h>
 
 #include    "MSatSystemState.h"
 #include    "MSatApi.h"
@@ -688,8 +689,18 @@
     else if ( TSatExtErrorUtils::IsExtendedError( aError ) ) // extended error
         {
         TUint8 addInfo( 0 );
+        // In subcase 2, SAT always gets KErrGsmCCCallRejected
+        if ( KErrGsmCCCallRejected == aError )   
+           {
+           LOG( SIMPLE, 
+           "SENDUSSD: CSendUssdHandler::HandleSendUssdResult permanent error" )	
+           // ussd request is rejected by SIM
+           iSendUssdRsp.iGeneralResult = RSat::KInteractionWithCCPermanentError;
+           iSendUssdRsp.iInfoType = RSat::KMeProblem;
+           addInfo = RSat::KActionNotAllowed;
+           }   
         // Check and map network failure
-        if ( TSatExtErrorUtils::IsNetworkError( aError ) )
+        else if ( TSatExtErrorUtils::IsNetworkError( aError ) )
             {
             LOG( SIMPLE, 
             "SENDUSSD: CSendUssdHandler::HandleSendUssdResult NetworkError" )
@@ -749,6 +760,16 @@
         iSendUssdRsp.iAdditionalInfo.SetLength( 0 );
         iSendUssdRsp.iAdditionalInfo.Zero();
         }
+    else if ( KErrSatControl == aError )
+        {
+        LOG( SIMPLE, 
+        "SENDUSSD: CSendUssdHandler::HandleSendUssdResult \
+        KModifiedByCallControl" )
+        iSendUssdRsp.iGeneralResult = RSat::KModifiedByCallControl;
+        iSendUssdRsp.iInfoType = RSat::KNoAdditionalInfo;
+        iSendUssdRsp.iAdditionalInfo.SetLength( 0 );
+        iSendUssdRsp.iAdditionalInfo.Zero(); 
+        }
     else if ( KErrNone == aError )   //  Success case
         {
         LOG( SIMPLE,