wlanutilities/wlanlogin/wlanloginapp/src/wlanloginengine.cpp
changeset 43 72ebcbb64834
parent 39 7b3e49e4608a
child 53 bdc64aa9b954
--- a/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginengine.cpp	Thu Jun 24 10:49:51 2010 +0300
+++ b/wlanutilities/wlanlogin/wlanloginapp/src/wlanloginengine.cpp	Fri Jul 09 10:38:19 2010 +0300
@@ -46,6 +46,7 @@
 // External function prototypes
 
 // Local constants
+const QString iapIdentifierPrefix = "I_";
 
 // ======== LOCAL FUNCTIONS ========
 
@@ -86,8 +87,10 @@
 WlanLoginEngine::~WlanLoginEngine()
 {
     OstTraceFunctionEntry0(WLANLOGINENGINE_DESTRUCTOR_ENTRY);
-   
-    mNetworkSession->close();
+
+    if (mNetworkSession) {
+        mNetworkSession->close();
+    }
     
     OstTraceFunctionExit0(WLANLOGINENGINE_DESTRUCTOR_EXIT);
 }
@@ -228,7 +231,8 @@
     setEngineState(WlanLoginEngine::OpeningNetworkSession);
     
     //Get configuration that matches the provided IAP
-    QNetworkConfiguration netConfiguration = mNetConfigurationManager->configurationFromIdentifier(QString::number(mIap));    
+	//Note that identifier must be given in format I_ + IAP ID
+    QNetworkConfiguration netConfiguration = mNetConfigurationManager->configurationFromIdentifier(iapIdentifierPrefix + QString::number(mIap));    
     
     OstTrace1(
         TRACE_NORMAL,