# HG changeset patch # User srilekhas # Date 1282567900 -3600 # Node ID 5b964fe90600ef273dc3f5175bff5e552b9f87b3 # Parent 5296bfa7b0a7596b3b66e837b5e42540b0cfe991# Parent a49137138563895be5387d7031048a2a939fc0c7 Merge RCL_3 fixes with latest delivery. diff -r a49137138563 -r 5b964fe90600 nettools/conntest/Engine/SocketsEngine.cpp --- a/nettools/conntest/Engine/SocketsEngine.cpp Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/Engine/SocketsEngine.cpp Mon Aug 23 13:51:40 2010 +0100 @@ -547,6 +547,50 @@ User::Panic( KPanicConnTest, EConnTestHttpClientInitializationFailed ); } + /* + * In case roaming, socket needs to be restarted in following cases. + */ + + if ( iEngineStatus == EConnecting || + iEngineStatus == ELookingUp ) + { + // Cancel and then re-connect + DoCancel(); + ConnectL(); + } + else if ( iEngineStatus == EConnected ) + { + // Cancel write socket + iSocketsWrite->Cancel(); + + // Cancel read socket + TBool isSocketActive( EFalse ); + if ( iSocketsRead->IsActive() ) + { + iSocketsRead->Cancel(); + isSocketActive = ETrue; + } + + // Re-connect + ChangeStatus( EInterfaceUp ); + ConnectL(); + + // Start read socket again + if ( isSocketActive ) + { + Read(); + } + } + else if ( iEngineStatus == EListening ) + { + DoCancel(); + ListenL(); + } + else if ( iEngineStatus == EDisconnecting ) + { + DoCancel(); + } + iConsole.PrintNotify( text ); } diff -r a49137138563 -r 5b964fe90600 nettools/conntest/data/ConnTest_reg.rss --- a/nettools/conntest/data/ConnTest_reg.rss Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/data/ConnTest_reg.rss Mon Aug 23 13:51:40 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2010 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" @@ -16,7 +16,7 @@ */ #include -#include +#include UID2 KUidAppRegistrationResourceFile UID3 0x101F6D2B // application UID diff -r a49137138563 -r 5b964fe90600 nettools/conntest/group/ConnTest.mmp --- a/nettools/conntest/group/ConnTest.mmp Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/group/ConnTest.mmp Mon Aug 23 13:51:40 2010 +0100 @@ -76,7 +76,7 @@ LIBRARY apparc.lib LIBRARY apgrfx.lib LIBRARY avkon.lib -LIBRARY AknSkins.lib +LIBRARY aknskins.lib LIBRARY aknnotify.lib LIBRARY bafl.lib LIBRARY commdb.lib diff -r a49137138563 -r 5b964fe90600 nettools/conntest/probe/src/prt.cpp --- a/nettools/conntest/probe/src/prt.cpp Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/probe/src/prt.cpp Mon Aug 23 13:51:40 2010 +0100 @@ -307,18 +307,20 @@ const TInt KMicrosInASecond = 1000000; - //TUint32 micros = interval.Int64().Low(); - TUint32 micros = I64LOW(interval.Int64());//.Low(); x.Low() -> I64LOW(x) - TUint32 secs = micros / KMicrosInASecond; - micros -= (secs * KMicrosInASecond); + // To avoid possible overflow caused by microsecond accuracy (32 bits + // of microseconds is just a bit over an hour), use 64-bit variables + // in calculation of timestamp + TInt64 secs = interval.Int64() / KMicrosInASecond; // // Reuse the protocol and flags fields of // RMBufPktInfo to store the time-stamp // RMBufPktInfo* info = RMBufPacket::PeekInfoInChain(copy); - info->iProtocol = static_cast(secs); - info->iFlags = static_cast(micros); + // Just let the seconds overflow in case of timestamp is over the + // integer scope (nothing reasonable to do in this case anyway) + info->iProtocol = static_cast( secs ); + info->iFlags = static_cast( interval.Int64() - ( secs * KMicrosInASecond )); iQueue.Append(copy); iDumpCb.CallBack(); diff -r a49137138563 -r 5b964fe90600 nettools/conntest/src/ConnTestAppUi.cpp --- a/nettools/conntest/src/ConnTestAppUi.cpp Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/src/ConnTestAppUi.cpp Mon Aug 23 13:51:40 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2006-2010 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" @@ -26,7 +26,7 @@ #include "ConnTestAppUi.h" #include "ConnTestView.h" -#include +#include #include "conntest.hrh" #include "SettingData.h" #include "ipdumpengine.h" diff -r a49137138563 -r 5b964fe90600 nettools/conntest/src/ConnTestView.cpp --- a/nettools/conntest/src/ConnTestView.cpp Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/src/ConnTestView.cpp Mon Aug 23 13:51:40 2010 +0100 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2006-2010 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" @@ -22,7 +22,7 @@ #include #include -#include +#include #include "ConnTestView.h" #include "ConnTestContainer.h" #include "CustomPrefsItemList.h" diff -r a49137138563 -r 5b964fe90600 nettools/conntest/src/Utils.cpp --- a/nettools/conntest/src/Utils.cpp Sun Apr 04 09:51:08 2010 +0100 +++ b/nettools/conntest/src/Utils.cpp Mon Aug 23 13:51:40 2010 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (c) 2006-2010 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" @@ -19,7 +19,7 @@ // INCLUDE FILES #include #include -#include +#include #include #include