localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp
branchRCL_3
changeset 5 11d83199e2d9
parent 1 388a17646e40
child 9 a2f12998bb04
--- a/localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp	Tue Feb 02 00:45:58 2010 +0200
+++ b/localconnectivityservice/obexreceiveservices/opp/src/oppcontroller.cpp	Fri Feb 19 23:43:38 2010 +0200
@@ -22,7 +22,7 @@
 #include    "btengdevman.h"
 #include    <obexutilsmessagehandler.h>
 #include    "debug.h"
-#include    <obexutils.rsg>
+#include    <Obexutils.rsg>
 #include    <bautils.h>
 #include    <UiklafInternalCRKeys.h>
 #include    <obexutilsuilayer.h>
@@ -221,6 +221,17 @@
     TRACE_FUNC
     iLengthHeaderReceived = EFalse; // New put request so clear header based state
     iObexTransferState = ETransferPut;
+    
+    // Checking if backup is running now - if backup process is active, then we
+    // need to cancel transfer - otherwise phone will freeze during receiving
+    // data
+    if ( TObexUtilsUiLayer::IsBackupRunning() )
+        {
+        TRACE_INFO ( _L ("Backup in progress! Canceling incoming transfer."));
+        iObexTransferState = ETransferPutInitError;
+        return NULL;
+        }
+    
     TRAPD(err, HandlePutRequestL());
     if(err == KErrNone)
         {