nettools/conntest/Engine/SocketsEngine.cpp
branchRCL_3
changeset 12 86091f1c2f4d
parent 2 4cefe9af9cf4
child 27 c6b52d057a05
--- a/nettools/conntest/Engine/SocketsEngine.cpp	Fri Mar 12 15:41:15 2010 +0200
+++ b/nettools/conntest/Engine/SocketsEngine.cpp	Mon Mar 15 12:39:11 2010 +0200
@@ -529,6 +529,24 @@
         text.AppendFormat( _L8("Unexpected NewCarrierActive %i\n"), aNewAP.AccessPoint() );
         iMobility->NewCarrierRejected();
         }
+    
+    // Clean up and refresh HTTP client for the new carrier
+    delete iHttpClient;
+    iHttpClient = NULL;
+    
+    TRAPD( err1, iHttpClient = CHttpClient::NewL( iConsole ) );
+    if ( err1 != KErrNone )
+        {
+        User::Panic( KPanicConnTest, EConnTestHttpClientInitializationFailed );
+        iHttpClient = NULL;
+        }
+    
+    TRAPD( err2, iHttpClient->SetHttpConnectionInfoL( ETrue, iConnection, iSocketServ ) );
+    if ( err2 != KErrNone )
+        {
+        User::Panic( KPanicConnTest, EConnTestHttpClientInitializationFailed );
+        }
+    
     iConsole.PrintNotify( text );
     }
 
@@ -1475,11 +1493,11 @@
     CleanupStack::PopAndDestroy(&appSess);
     }
 
-    // ---------------------------------------------------------
-    // CSocketsEngine::SendHttpFrameworkRequestL()
-    // Send HTTP request
-    // ---------------------------------------------------------
-    //
+// ---------------------------------------------------------
+// CSocketsEngine::SendHttpFrameworkRequestL()
+// Send HTTP request
+// ---------------------------------------------------------
+//
 void CSocketsEngine::SendHttpFrameworkRequestL( TBool aHasBody,
         TBool aDoPerformance,
         TBool aIsSecure )