wlanutilities/wlansniffer/model/src/wsfmodel.cpp
branchRCL_3
changeset 11 8b0eae1b1d71
parent 10 dff6ebfd236f
child 12 981afc7d3841
--- a/wlanutilities/wlansniffer/model/src/wsfmodel.cpp	Fri Mar 12 15:48:54 2010 +0200
+++ b/wlanutilities/wlansniffer/model/src/wsfmodel.cpp	Mon Mar 15 12:44:54 2010 +0200
@@ -321,11 +321,15 @@
 EXPORT_C void CWsfModel::DisconnectL()
     {
     LOG_ENTERFN( "CWsfModel::DisconnectL" );
-    iSession.DisconnectWlanBearerL();
+    TBool disconnected = iSession.DisconnectWlanBearerL();
+    LOG_WRITEF( "disconnected = %d", disconnected );
     iConnectedIapId = 0;
     iConnectedNetId = 0;
     iConnectOnly = EFalse;
-	iRefreshing = iSession.RequestScanL(); 
+    if ( !disconnected )
+        {
+        iRefreshing = iSession.RequestScanL(); 
+        }
     }
 
 
@@ -942,7 +946,7 @@
 
     // check if the app is already running ... and kill it.
     TUid id( TUid::Uid( KHelperApUid.iUid ) );
-    TApaTaskList taskList( CEikonEnv::Static()->WsSession() );
+    TApaTaskList taskList( iEikEnv->WsSession() );
     TApaTask task = taskList.FindApp( id );
 
     if ( task.Exists() )