mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp
branchRCL_3
changeset 13 bea5e7625e42
parent 12 2eb3b066cc7d
child 19 095bea5f582e
--- a/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp	Tue May 25 13:16:00 2010 +0300
+++ b/mmserv/radioutility/radioserver/Server/Src/RadioServer.cpp	Wed Jun 09 10:15:38 2010 +0300
@@ -1435,6 +1435,7 @@
         iState = EStateTunerOff;
         iPreEmpted = ETrue;
         iSettings->SetRadioOff(aError);
+        RADIO_RDEBUG(_L("[RADIO-SVR] PlayError() - Call TunerOff and start waiting"));
         iTunerControl->TunerOff();		//The adaptation is expected to call TunerOffComplete() upon completion
         // wait for TunerOffComplete callback
         iSchedulerWait->Start();
@@ -1680,12 +1681,6 @@
         return;
         }
 
-    if ( iState != EStateStarted )
-        {
-        CompleteAsyncRequest(KErrAlreadyExists);
-        return;
-        }
-
     TInt err = KErrNone;
     if ( !iTunerControl )
         {
@@ -1832,7 +1827,7 @@
             break;
         case EStateTunerOff:
             if ( iSettings->IsAntennaAttached() && AllowRadioInOfflineMode()
-                    && !iSettings->IsTransmitterActive() )
+                    && !iSettings->IsTransmitterActive() && !iPreEmpted )
                 {
                 RADIO_RDEBUG(_L("[RADIO-SVR] ProcessSetFrequency() - Sent TunerOn request"));
                 RecreateFmTunerControl();