widgets/widgetapp/src/WidgetUiWindow.cpp
branchRCL_3
changeset 42 a1a5d4e727e8
parent 41 4bd5176e1bc8
child 44 800203832575
--- a/widgets/widgetapp/src/WidgetUiWindow.cpp	Tue May 25 13:52:38 2010 +0300
+++ b/widgets/widgetapp/src/WidgetUiWindow.cpp	Wed Jun 09 10:52:50 2010 +0300
@@ -231,6 +231,14 @@
         iEngine->RemoveLoadEventObserver( iWidgetUiObserver );
         iEngine->RemoveStateChangeObserver( iWindowManager.View() );
         }
+#ifdef BRDO_OCC_ENABLED_FF 
+    if ( iRetryConnectivity)
+        {
+        iRetryConnectivity->Cancel();
+        delete iRetryConnectivity;
+        iRetryConnectivity = NULL;
+        }
+#endif
     delete iEngine;
     delete iWidgetUiObserver;
     delete iUrl;
@@ -931,9 +939,14 @@
             User::Leave( connFailure );
             }
         *aNewConn = ETrue;
-        
+        if(iWindowManager.GetNetworkMode() == EOfflineMode)
+        	{
+            iWindowManager.GetConnection()->CancelConnection();
+            iWindowManager.GetConnection()->StopConnectionL();        		
+        	}      
 #ifdef BRDO_OCC_ENABLED_FF        
-        TRAP_IGNORE(ConnNeededStatusL(KErrNone)); 
+		else
+        	TRAP_IGNORE(ConnNeededStatusL(KErrNone)); 
 #endif        
         }
     }
@@ -1344,6 +1357,10 @@
             }
         iRetryConnectivity->Start(KRetryConnectivityTimeout, 0,TCallBack(RetryConnectivity,this));
         }
+    else
+        {
+        TRAP_IGNORE( Engine()->HandleCommandL( (TInt)TBrCtlDefs::ECommandCancelFetch + (TInt)TBrCtlDefs::ECommandIdBase ) );
+        }
     }  
 
 void CWidgetUiWindow::ConnNeededStatusL( TInt aErr )