--- a/nettools/conntest/Engine/SocketsEngine.cpp Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/Engine/SocketsEngine.cpp Tue Feb 02 00:02:42 2010 +0200
@@ -951,6 +951,8 @@
// completion can be handled appropriately
iTimer->Cancel(); // Cancel TimeOut timer before completion
TBuf<64> text( _L(""));
+ TBuf<64> errorText( _L("") );
+
switch (iEngineStatus)
{
case EInterfaceDown:
@@ -992,7 +994,7 @@
}
else
{
- iConsole.ErrorNotify( _L("<CSocketsEngine> Startup failed"), iStatus.Int() );
+ errorText.Append(_L("<CSocketsEngine> Startup failed"));
ChangeStatus( EInterfaceDown );
SetSocketEngineConnType( ETypeUnknown );
}
@@ -1010,7 +1012,7 @@
}
else
{
- iConsole.ErrorNotify( _L("<CSocketsEngine> Conn. failed"), iStatus.Int() );
+ errorText.Append(_L("<CSocketsEngine> Conn. failed"));
ChangeStatus( EInterfaceUp );
}
break;
@@ -1038,7 +1040,7 @@
else
{
// DNS lookup failed
- iConsole.ErrorNotify( _L("<CSocketsEngine> DNS lookup failed"), iStatus.Int() );
+ errorText.Append(_L("<CSocketsEngine> DNS lookup failed"));
ChangeStatus( EInterfaceUp );
}
break;
@@ -1054,7 +1056,7 @@
}
else
{
- iConsole.ErrorNotify( _L("<CSocketsEngine> Accept. failed"), iStatus.Int() );
+ errorText.Append(_L("<CSocketsEngine> DNS lookup failed"));
iListeningSocket.Close();
iSocket.Close();
ChangeStatus( EInterfaceUp );
@@ -1074,6 +1076,13 @@
// has already been altered in ProgressNotifyReceived method.
break;
}
+
+ // ErrorNotify starts the scheduler, don't add any code that refers to
+ // class variables after it (they might have changed!)
+ if (errorText.Length() > 0)
+ {
+ iConsole.ErrorNotify( errorText, iStatus.Int() );
+ }
}
// ---------------------------------------------------------
@@ -1487,7 +1496,6 @@
//
void CSocketsEngine::ProgressNotifyReceivedL( TInt aStage, TInt aError )
{
-
TBuf8<64> text;
text.AppendFormat( _L8("Progress: %d, %d"), aStage, aError );
@@ -1543,105 +1551,105 @@
iTempProgressNotifier = NULL;
}
break;
- case KConnectionFailure: // 2001
- iConsole.PrintNotify(_L8("Connection failure"));
- iConsole.PrintNotify(error);
- break;
- case KMinAgtProgress: // 2500
- iConsole.PrintNotify(_L8("Min agt progress"));
- iConsole.PrintNotify(error);
- break;
- case KConnectionOpen: // 3500
- iConsole.PrintNotify(_L8("Connection open"));
- iConsole.PrintNotify(error);
- break;
- case KConnectionClosed: // 4500
- iConsole.PrintNotify(_L8("Connection closed"));
- iConsole.PrintNotify(error);
- break;
- case KMaxAgtProgress: // 5500
- iConsole.PrintNotify(_L8("Max agent progress"));
- iConsole.PrintNotify(error);
- break;
- case KMinNifProgress: // 6000
- iConsole.PrintNotify(_L8("Min nif progress"));
- iConsole.PrintNotify(error);
- break;
- case KLinkLayerOpen: // 7000
- iConsole.PrintNotify(_L8("Link layer open"));
- iConsole.PrintNotify(error);
- break;
- case KLinkLayerClosed: // 8000
- iConsole.PrintNotify(_L8("Link layer closed"));
- iConsole.PrintNotify(error);
- iHttpClient->SetHttpConnectionInfoL(ETrue, iConnection, iSocketServ);
+ case KConnectionFailure: // 2001
+ iConsole.PrintNotify(_L8("Connection failure"));
+ iConsole.PrintNotify(error);
+ break;
+ case KMinAgtProgress: // 2500
+ iConsole.PrintNotify(_L8("Min agt progress"));
+ iConsole.PrintNotify(error);
+ break;
+ case KConnectionOpen: // 3500
+ iConsole.PrintNotify(_L8("Connection open"));
+ iConsole.PrintNotify(error);
+ break;
+ case KConnectionClosed: // 4500
+ iConsole.PrintNotify(_L8("Connection closed"));
+ iConsole.PrintNotify(error);
+ break;
+ case KMaxAgtProgress: // 5500
+ iConsole.PrintNotify(_L8("Max agent progress"));
+ iConsole.PrintNotify(error);
+ break;
+ case KMinNifProgress: // 6000
+ iConsole.PrintNotify(_L8("Min nif progress"));
+ iConsole.PrintNotify(error);
+ break;
+ case KLinkLayerOpen: // 7000
+ iConsole.PrintNotify(_L8("Link layer open"));
+ iConsole.PrintNotify(error);
+ break;
+ case KLinkLayerClosed: // 8000
+ iConsole.PrintNotify(_L8("Link layer closed"));
+ iConsole.PrintNotify(error);
+ iHttpClient->SetHttpConnectionInfoL(ETrue, iConnection, iSocketServ);
+
+ switch (iEngineStatus)
+ {
+ case EStartingInterface:
+ // This case will occur, if username/password prompt dialog
+ // is used and cancel is selected in dialog, and when error
+ // occurs during interface startup.
+ break;
+ case EInterfaceDown:
+ // EInterfaceDown must be handled also, because this
+ // state has been set in StopInterface method.
+ break;
+ case EListening:
+ iListeningSocket.CancelAccept();
+ iListeningSocket.Close();
+ // FALLTHROUGH
+ case ELookingUp:
+ // Cancel everything depending on state.
+ iResolver.Cancel();
+ iResolver.Close();
+ // FALLTHROUGH
+ case EConnected:
+ iSocketsRead->Cancel();
+ iSocketsWrite->Cancel();
+ // FALLTHROUGH
+ case EConnecting:
+ // This looks awful, but is required because of the fall through
+ // and buggy implementation of the CancelConnect.
+ if( EConnecting == iEngineStatus )
+ {
+ iSocket.CancelConnect();
+ }
+ // FALLTHROUGH
+ case EDisconnecting:
+ iSocket.Close();
+ // FALLTHROUGH
+ case EInterfaceUp:
+ if (iRoaming == ERoamingOff)
+ {
+ UnRegisterFromMobilityAPI();
+ SetSocketEngineConnType(ETypeUnknown);
+ ChangeStatus(EInterfaceDown);
+ }
+ else
+ {
+ iConsole.PrintNotify(_L8("MobilitySession lost!\n"));
+ UnRegisterFromMobilityAPI();
+ SetSocketEngineConnType(ETypeUnknown);
+ ChangeStatus(EInterfaceDown);
+ }
+ break;
+ default:
+ User::Panic(KPanicSocketsEngine, EConnTestBadStatus);
+ break;
+ }
+
+ break;
+ case KMaxNifProgress: // 9000
+ iConsole.PrintNotify(_L8("Max nif progress\n"));
+ break;
+ default:
+ iConsole.PrintNotify(text);
+ }
+ iConsole.PrintNotify(_L8("\f"));
+ }
- switch (iEngineStatus)
- {
- case EStartingInterface:
- // This case will occur, if username/password prompt dialog
- // is used and cancel is selected in dialog, and when error
- // occurs during interface startup.
- break;
- case EInterfaceDown:
- // EInterfaceDown must be handled also, because this
- // state has been set in StopInterface method.
- break;
- case EListening:
- iListeningSocket.CancelAccept();
- iListeningSocket.Close();
- // FALLTHROUGH
- case ELookingUp:
- // Cancel everything depending on state.
- iResolver.Cancel();
- iResolver.Close();
- // FALLTHROUGH
- case EConnected:
- iSocketsRead->Cancel();
- iSocketsWrite->Cancel();
- // FALLTHROUGH
- case EConnecting:
- // This looks awful, but is required because of the fall through
- // and buggy implementation of the CancelConnect.
- if( EConnecting == iEngineStatus )
- {
- iSocket.CancelConnect();
- }
- // FALLTHROUGH
- case EDisconnecting:
- iSocket.Close();
- // FALLTHROUGH
- case EInterfaceUp:
- if (iRoaming == ERoamingOff)
- {
- UnRegisterFromMobilityAPI();
- SetSocketEngineConnType(ETypeUnknown);
- ChangeStatus(EInterfaceDown);
- }
- else
- {
- iConsole.PrintNotify(_L8("MobilitySession lost!\n"));
- UnRegisterFromMobilityAPI();
- SetSocketEngineConnType(ETypeUnknown);
- ChangeStatus(EInterfaceDown);
- }
- break;
- default:
- User::Panic(KPanicSocketsEngine, EConnTestBadStatus);
- break;
- }
-
- break;
- case KMaxNifProgress: // 9000
- iConsole.PrintNotify(_L8("Max nif progress\n"));
- break;
- default:
- iConsole.PrintNotify(text);
- }
- iConsole.PrintNotify(_L8("\f"));
- }
-
- // ---------------------------------------------------------
+ // ---------------------------------------------------------
// CSocketsEngine::ProgressNotifyError(TInt aStatus)
// Some error has occurred while receiving progress
// notifications.
--- a/nettools/conntest/data/ConnTest.rss Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/data/ConnTest.rss Tue Feb 02 00:02:42 2010 +0200
@@ -134,7 +134,7 @@
MENU_ITEM { command=EConnTestCmdDisconnect; txt = "Disconnect"; },
- MENU_ITEM { command = EConnTestCmdClearOutputWindow; txt = "Clear output"; },
+ MENU_ITEM { command=EConnTestCmdOutputWindow; txt = "Output"; cascade=r_conntest_sub_menu_output;},
MENU_ITEM { command=EConnTestCmdSendRawData; txt = "Send";
cascade=r_conntest_sub_menu_send; },
@@ -157,6 +157,16 @@
};
}
+RESOURCE MENU_PANE r_conntest_sub_menu_output
+ {
+ items=
+ {
+ MENU_ITEM { command=EConnTestCmdClearOutputWindow; txt = "Clear"; },
+ MENU_ITEM { command=EConnTestCmdSaveOutputWindow; txt = "Save"; }
+ };
+ }
+
+
RESOURCE MENU_PANE r_conntest_sub_menu_wlan
{
items=
--- a/nettools/conntest/group/bld.inf Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/group/bld.inf Tue Feb 02 00:02:42 2010 +0200
@@ -23,6 +23,7 @@
PRJ_EXPORTS
../rom/ConnTest.iby CORE_IBY_EXPORT_PATH(tools,ConnTest.iby)
+../rom/conntest_stub.sis /epoc32/data/z/system/install/conntest_stub.sis
PRJ_MMPFILES
ConnTest.mmp
--- a/nettools/conntest/inc/ConnTestContainer.h Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/inc/ConnTestContainer.h Tue Feb 02 00:02:42 2010 +0200
@@ -60,6 +60,11 @@
*/
void ClearOutputWindow();
+ /**
+ * Stores the content of output window to a file.
+ */
+ void SaveOutputWindowToFile();
+
public: // Functions from base classes
// From MUINotify
--- a/nettools/conntest/inc/conntest.hrh Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/inc/conntest.hrh Tue Feb 02 00:02:42 2010 +0200
@@ -65,7 +65,9 @@
EConnTestCmdAdvanced,
EConnTestCmdConnectionInfo,
EConnTestCmdInterfaceInfo,
+ EConnTestCmdOutputWindow,
EConnTestCmdClearOutputWindow,
+ EConnTestCmdSaveOutputWindow,
EConnTestCmdHttpFrameworkGet,
EConnTestCmdHttpFrameworkPost,
EConnTestCmdHttpFrameworkSecureGet,
--- a/nettools/conntest/rom/ConnTest.iby Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/rom/ConnTest.iby Tue Feb 02 00:02:42 2010 +0200
@@ -23,12 +23,14 @@
AUTO-BITMAP=DATAZ_\APP_BITMAP_DIR\ConnTest_AIF.mbm APP_BITMAP_DIR\ConnTest_AIF.mbm
data=DATAZ_\APP_BITMAP_DIR\ConnTest_AIF.mif APP_BITMAP_DIR\ConnTest_AIF.mif
-data=ZSYSTEM\..\PRIVATE\10003A3F\APPS\ConnTEst_REG.RSC Private\10003a3f\apps\ConnTest_reg.rsc
-//data=DATAZ_\PRIVATE\10003A3F\APPS\ConnTEst_REG.RSC Private\10003a3f\apps\ConnTest_reg.rsc
+S60_UPGRADABLE_APP_REG_RSC(ConnTest)
data=DATAZ_\APP_RESOURCE_DIR\ConnTest.RSC APP_RESOURCE_DIR\ConnTest.rsc
data=EPOCROOT##epoc32\data\c\private\101F7989\esock\ip.probe.esk private\101F7989\esock\ip.probe.esk
-file=ABI_DIR\urel\probe.prt system\libs\probe.prt
+
+file=ABI_DIR\urel\probe.prt sys\bin\probe.prt
+
+data=DATAZ_\system\install\conntest_stub.sis system\install\conntest_stub.sis
#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/nettools/conntest/rom/conntest_stub.pkg Tue Feb 02 00:02:42 2010 +0200
@@ -0,0 +1,37 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: This is the stub package file for ConnTest SIS creation
+;
+
+;
+; Languages
+&EN
+
+; Header
+#{"ConnTest"},(0x101F6D2B),1,0,0,TYPE=SA
+
+; Localised Vendor name
+%{"Nokia Test EN"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Stub Files
+""-"z:\private\10003a3f\import\apps\ConnTest_reg.rsc"
+""-"z:\sys\bin\ConnTest.exe"
+""-"z:\resource\apps\ConnTest_AIF.mbm"
+""-"z:\resource\apps\ConnTest_AIF.mif"
+""-"z:\resource\apps\ConnTest.rsc"
+""-"z:\private\101f7989\import\esock\ip.probe.esk"
+""-"z:\sys\bin\probe.prt"
Binary file nettools/conntest/rom/conntest_stub.sis has changed
--- a/nettools/conntest/src/ConnTestContainer.cpp Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/src/ConnTestContainer.cpp Tue Feb 02 00:02:42 2010 +0200
@@ -452,5 +452,24 @@
}
}
+// ----------------------------------------------------------------------------
+// CConnTestContainer::SaveOutputWindowToFile
+// Store console output log to a file.
+// ----------------------------------------------------------------------------
+//
+void CConnTestContainer::SaveOutputWindowToFile()
+ {
+ TInt error;
+ _LIT( KOutputInternalMemory, "c:\\data\\conntest_output.txt" );
+
+ TBuf<100> filename( KOutputInternalMemory );
+
+ TRAP( error, iRichText->ExportAsTextL( filename, CPlainText::EOrganiseByParagraph, 0));
+
+ if(error != KErrNone)
+ {
+ User::Panic (KPanicConnTest, EConnTestContainer);
+ }
+ }
// End of File
--- a/nettools/conntest/src/ConnTestView.cpp Mon Jan 18 20:08:29 2010 +0200
+++ b/nettools/conntest/src/ConnTestView.cpp Tue Feb 02 00:02:42 2010 +0200
@@ -238,6 +238,10 @@
iContainer->ClearOutputWindow();
break;
+ case EConnTestCmdSaveOutputWindow:
+ iContainer->SaveOutputWindowToFile();
+ break;
+
case EConnTestCmdSettings:
// Display settings list
SwapContainerL(ESettingsContainer);