--- a/nettools/conntest/Engine/HttpHandler.cpp Fri Apr 16 14:51:55 2010 +0300
+++ b/nettools/conntest/Engine/HttpHandler.cpp Thu Jun 10 15:17:50 2010 +0300
@@ -142,6 +142,7 @@
TBuf<100> proxyAddr;
TBuf8<100> proxyAddr2;
TUint32 proxyPort;
+ TBool useProxy;
TUint connCount;
CCommsDatabase* TheDb;
RStringF proxyName;
@@ -191,24 +192,29 @@
if(result == KErrNone)
{
- // This IAP uses proxy, set it to http session
- view->ReadUintL(TPtrC(PROXY_PORT_NUMBER), proxyPort);
- HBufC* k = view->ReadLongTextLC(TPtrC(PROXY_SERVER_NAME));
- proxyAddr.Copy(k->Des());
- proxyAddr.AppendFormat(_L(":%d"), proxyPort);
-
- proxyAddr2.Copy(proxyAddr);
-
- CleanupClosePushL(proxyName);
- proxyName = iHttpSession.StringPool().OpenFStringL(proxyAddr2);
- connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyUsage,RHTTPSession::GetTable()),
- proxyUsage );
- connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyAddress,RHTTPSession::GetTable()),
- proxyName );
- CleanupStack::PopAndDestroy(&proxyName); // proxyName
- CleanupStack::PopAndDestroy(k); //k
-
- RDebug::Print(_L("ConnTest: Proxy address: %S"), &proxyAddr);
+ // Check whether proxy should be used for this IAP
+ TRAPD(proxyErr, view->ReadBoolL(TPtrC(PROXY_USE_PROXY_SERVER), useProxy));
+ if((proxyErr == KErrNone) && useProxy)
+ {
+ // This IAP uses proxy, set it to http session
+ view->ReadUintL(TPtrC(PROXY_PORT_NUMBER), proxyPort);
+ HBufC* k = view->ReadLongTextLC(TPtrC(PROXY_SERVER_NAME));
+ proxyAddr.Copy(k->Des());
+ proxyAddr.AppendFormat(_L(":%d"), proxyPort);
+
+ proxyAddr2.Copy(proxyAddr);
+
+ CleanupClosePushL(proxyName);
+ proxyName = iHttpSession.StringPool().OpenFStringL(proxyAddr2);
+ connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyUsage,RHTTPSession::GetTable()),
+ proxyUsage );
+ connInfo.SetPropertyL( strPool.StringF(HTTP::EProxyAddress,RHTTPSession::GetTable()),
+ proxyName );
+ CleanupStack::PopAndDestroy(&proxyName); // proxyName
+ CleanupStack::PopAndDestroy(k); //k
+
+ RDebug::Print(_L("ConnTest: Proxy address: %S"), &proxyAddr);
+ }
}
CleanupStack::PopAndDestroy(view); // view
CleanupStack::PopAndDestroy(TheDb); // TheDb