convergedconnectionhandler/cchclientapi/src/cchserviceimplasynchroniser.cpp
branchRCL_3
changeset 14 be41ab7b952f
parent 9 bddb6d4447db
--- a/convergedconnectionhandler/cchclientapi/src/cchserviceimplasynchroniser.cpp	Tue Apr 27 16:28:03 2010 +0300
+++ b/convergedconnectionhandler/cchclientapi/src/cchserviceimplasynchroniser.cpp	Tue May 11 16:04:22 2010 +0300
@@ -66,18 +66,16 @@
 void CCchServiceImplAsynchroniser::Disable( TCCHSubserviceType aType )
     {
     CCHLOGSTRING( "CCchServiceImplAsynchroniser::Disable IN" );
-    if (iState == EIdle)
+    if (iState != EIdle)
         {
+        Cancel();
+        }
         iState = EDisabling;
         TRequestStatus status = KErrNone;
         TServiceSelection selection( iServiceId, aType );
         SetActive();
         iCch.CchClient().DisableService( selection, iStatus );
-        }
-    else
-        {
-        CCHLOGSTRING( "CCchServiceImplAsynchroniser already active" );
-        }
+
     CCHLOGSTRING( "CCchServiceImplAsynchroniser::Disable OUT" );
     }
 
@@ -95,7 +93,14 @@
 
 void CCchServiceImplAsynchroniser::DoCancel()
     {
-
+    if ( EEnabling == iState ) 
+            { 
+            iCch.CchClient().EnableServiceCancel(); 
+            } 
+        else if ( EDisabling == iState ) 
+            { 
+            iCch.CchClient().DisableServiceCancel(); 
+            } 
     }
 
 void CCchServiceImplAsynchroniser::RunL()