# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1277307391 -10800 # Node ID 3c8db403127f0bb4969eb4cd3b9f2a6f3c4b8f6c # Parent 740ceea8e153de269e1c3626f8812f04fb3c9026 Revision: 201023 Kit: 2010125 diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/ApnManager/inc/sipapnconfigurationhandler.h --- a/realtimenetprots/sipfw/ProfileAgent/ApnManager/inc/sipapnconfigurationhandler.h Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/ApnManager/inc/sipapnconfigurationhandler.h Wed Jun 23 18:36:31 2010 +0300 @@ -140,10 +140,8 @@ /** * Reads the APN of specified IAP. - * @param aIapId IAP id - * @return APN or NULL if not found. Ownership is transferred. */ - HBufC8* ReadCurrentApnL(); + void ReadCurrentApnL(); private: // Constructors diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/ApnManager/src/sipapnconfigurationhandler.cpp --- a/realtimenetprots/sipfw/ProfileAgent/ApnManager/src/sipapnconfigurationhandler.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/ApnManager/src/sipapnconfigurationhandler.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -126,7 +126,7 @@ // CSIPApnConfigurationHandler::ReadCurrentApnL // ----------------------------------------------------------------------------- // -HBufC8* CSIPApnConfigurationHandler::ReadCurrentApnL() +void CSIPApnConfigurationHandler::ReadCurrentApnL() { HBufC8* apn(NULL); @@ -193,15 +193,13 @@ delete iCurrentApn; iCurrentApn = NULL; - iCurrentApn = apn->AllocL(); + iCurrentApn = apn; } db->ClearAttributeMask( ECDHidden ); CleanupStack::PopAndDestroy( iapRecord ); CleanupStack::PopAndDestroy( db ); - - return apn; } // ----------------------------------------------------------------------------- @@ -327,6 +325,7 @@ User::LeaveIfError( iSocketSrv.Connect() ); iRepository = CRepository::NewL( KCRUidCmManager ); + ReadCurrentApnL(); PROFILE_DEBUG1( "CSIPApnConfigurationHandler::ConstructL() exit" ) } @@ -478,16 +477,12 @@ "CSIPApnConfigurationHandler::ApnChangeNeededL()" ) TBool apnChangeNeeded( EFalse ); - HBufC8* currentApn = ReadCurrentApnL(); - - if ( currentApn && currentApn->Compare( aApn ) != 0 ) + if ( iCurrentApn && iCurrentApn->Compare( aApn ) != 0 ) { // Apn is not the same as wanted apnChangeNeeded = ETrue; } - delete currentApn; - PROFILE_DEBUG3( "CSIPApnConfigurationHandler::ApnChangeNeededL(), apnChangeNeeded", apnChangeNeeded ) @@ -796,13 +791,12 @@ const TDesC8& aNewApn, TInt aError ) { - if ( !IsPrimaryApnUsed() ) + HBufC8* currentApn = aNewApn.AllocL(); + delete iCurrentApn; + iCurrentApn = NULL; + iCurrentApn = currentApn; + if ( IsPrimaryApnUsed() ) { - HBufC8* currentApn = aNewApn.AllocL(); - delete iCurrentApn; - iCurrentApn = NULL; - iCurrentApn = currentApn; - iObserver.ApnChanged( *iCurrentApn, iIapId, aError ); } } diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/IETF_Agent/src/Sipietfprofilecontext.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -494,11 +494,11 @@ return (aError == K503ServiceUnavailable || aError == K408TimeOut || aError == K500ServerInternalError || - aError == KErrSIPOutboundProxyNotResponding || aError == KErrTimedOut || ((aError == KErrSIPResolvingFailure || aError == KErrSIPTransportFailure || - aError == KErrSIPICMPFailure) && + aError == KErrSIPICMPFailure || + aError == KErrSIPOutboundProxyNotResponding ) && iConnection.State() != CSIPConnection::ESuspended)); } diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/Sipimsprofilecontext.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/Sipimsprofilecontext.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/Sipimsprofilecontext.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -785,12 +785,12 @@ aError == K408TimeOut || aError == K480TemporarilyUnavailable || aError == K500ServerInternalError || - aError == K504ServerTimeOut || - aError == KErrSIPOutboundProxyNotResponding || + aError == K504ServerTimeOut || aError == KErrTimedOut || ((aError == KErrSIPResolvingFailure || aError == KErrSIPTransportFailure || - aError == KErrSIPICMPFailure) && + aError == KErrSIPICMPFailure || + aError == KErrSIPOutboundProxyNotResponding ) && iConnection.State() != CSIPConnection::ESuspended)); } diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -571,6 +571,7 @@ void CSIPProfileCacheItem::VpnInUse(TBool aStatus) { iIsVpnInUse = aStatus; + iCurrentState->ShutdownInitiated(*this); } // ----------------------------------------------------------------------------- diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -242,6 +242,15 @@ TUint32 aContextId) { CSIPProfileCacheItem* item = ProfileCacheItem(aProfile.Id()); + + if(aContextId == 0 && item) + { + if(item->IsApnSwitchEnabled()) + { + UsePrimaryApn(aProfile.IapId()); + } + } + TRAPD(err, SIPProfileStatusEventL(aProfile.Id(), aContextId)); if (err != KErrNone) @@ -336,7 +345,20 @@ item->IsVpnInUse())) ConfirmSystemstateMonitor(CSipSystemStateMonitor::EVpnState); } - } + + if(FeatureManager::FeatureSupported( KFeatureIdFfSipApnSwitching)) + { + if(item && item->IsApnSwitchEnabled() && aContextId) + { + CSIPConcreteProfile::TStatus status; + iPluginDirector->State( status, item->Profile() ); + if(status == CSIPConcreteProfile::EUnregistered) + { + UseBackupApn(item->Profile().IapId(), EFalse); + } + } + } + } CheckServerStatus(); } @@ -475,11 +497,11 @@ TBool waitForDeregistration = EFalse; for (TInt i = 0; i < iProfileCache.Count(); i++) { - iProfileCache[i]->OfflineInitiated(ETrue); CSIPConcreteProfile::TStatus status; iPluginDirector->State(status, iProfileCache[i]->UsedProfile()); if(status != CSIPConcreteProfile::EUnregistered) - waitForDeregistration = ETrue; + waitForDeregistration = ETrue; + iProfileCache[i]->OfflineInitiated(ETrue); } if(!waitForDeregistration) { @@ -515,11 +537,11 @@ TBool waitForDeregistration = EFalse; for (TInt i = 0; i < iProfileCache.Count(); i++) { - iProfileCache[i]->RfsInprogress(ETrue); CSIPConcreteProfile::TStatus status; iPluginDirector->State(status, iProfileCache[i]->UsedProfile()); if (status != CSIPConcreteProfile::EUnregistered) waitForDeregistration = ETrue; + iProfileCache[i]->RfsInprogress(ETrue); } if(!waitForDeregistration) { @@ -564,12 +586,11 @@ TBool waitForDeregistration = EFalse; for (TInt i = 0; i < iProfileCache.Count(); i++) { - iProfileCache[i]->VpnInUse( ETrue ); - iProfileCache[i]->ShutdownInitiated(); CSIPConcreteProfile::TStatus status; iPluginDirector->State(status, iProfileCache[i]->UsedProfile()); if (status != CSIPConcreteProfile::EUnregistered) waitForDeregistration = ETrue; + iProfileCache[i]->VpnInUse( ETrue ); } if (!waitForDeregistration) { @@ -1646,26 +1667,33 @@ CSIPConcreteProfile::TStatus aStatus, TInt aError) { - TInt err(aError); - if (aStatus == CSIPConcreteProfile::EUnregistrationInProgress) + PROFILE_DEBUG3("CSIPProfileServerCore::HandleAsyncError, error", aError) + TBool isFatal(EFalse); + if(aError != KErrSIPApnSwitchNonFatalFailure) { - err = KErrNone; - } + TInt err(aError); + if (aStatus == CSIPConcreteProfile::EUnregistrationInProgress) + { + err = KErrNone; + } - if (HandleProfileError(aItem, err)) - { - if (err == KErrTotalLossOfPrecision) - { - TRAP_IGNORE(SendUnregisteredStatusEventL(aItem)) - } - else - { - SendErrorEvent(aItem, aStatus, aError); - } - } + if (HandleProfileError(aItem, err)) + { + if (err == KErrTotalLossOfPrecision) + { + TRAP_IGNORE(SendUnregisteredStatusEventL(aItem)) + } + else + { + SendErrorEvent(aItem, aStatus, aError); + isFatal = ETrue; + } + } + } + if(aItem.IsApnSwitchEnabled()) { - UseBackupApn(aItem.Profile().IapId(), ETrue); + UseBackupApn(aItem.Profile().IapId(), isFatal); } } @@ -2401,7 +2429,7 @@ { PROFILE_DEBUG1("CSIPProfileServerCore::UseBackupApn") - if ( iApnManager->IsFailed( aIapId ) || aFatalFailure ) + if ( !iApnManager->IsFailed( aIapId ) || aFatalFailure ) { iApnManager->SetFailed( aIapId, ETrue, aFatalFailure ); } diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/Sipprflregisteredstate.cpp --- a/realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/Sipprflregisteredstate.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/Sipprflregisteredstate.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -14,7 +14,7 @@ // Name : sipprflregisteredstate.cpp // Part of : sip profile fsm // implementation -// Version : %version: 2.1.2 % +// Version : %version: 2.1.3 % // @@ -370,7 +370,8 @@ } else if ((aError == KErrSIPTransportFailure || aError == KErrSIPResolvingFailure || - aError == KErrSIPICMPFailure) && + aError == KErrSIPICMPFailure || + aError == KErrSIPOutboundProxyNotResponding ) && aContext.Connection().State() == CSIPConnection::ESuspended) { //registration was dropped due to the expired diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/sipprflregistrationinprogressstate.cpp --- a/realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/sipprflregistrationinprogressstate.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/sipprflregistrationinprogressstate.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -14,7 +14,7 @@ // Name : sipprflregistrationinprogressstate.cpp // Part of : sip profile fsm // implementation -// Version : %version: 2.1.1 % +// Version : %version: 2.1.2 % // @@ -174,7 +174,8 @@ } else if ((aError == KErrSIPTransportFailure || aError == KErrSIPResolvingFailure || - aError == KErrSIPICMPFailure) && + aError == KErrSIPICMPFailure || + aError == KErrSIPOutboundProxyNotResponding ) && aContext.Connection().State()==CSIPConnection::ESuspended) { //registration failed due to the suspended connection, re-try later diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Codec/src/CSIPAcceptEncodingHeader.cpp --- a/realtimenetprots/sipfw/SIP/Codec/src/CSIPAcceptEncodingHeader.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Codec/src/CSIPAcceptEncodingHeader.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -28,6 +28,7 @@ #include "sipstrconsts.h" #include "sipcodecutils.h" #include "_sipcodecdefs.h" +#include // ---------------------------------------------------------------------------- @@ -161,10 +162,19 @@ { HBufC8* tmp = aCodings.AllocLC(); tmp->Des().Trim(); - if (tmp->Length() > 0 && !SIPSyntaxCheck::Token(*tmp)) + //Allowing '/' token for interoperability issues + RArray array; + if(CFeatureDiscovery::IsFeatureSupportedL(TUid::Uid(KFeatureIdFfSipApnSwitching))) + { + array.Append('/'); + } + + if (tmp->Length() > 0 && !SIPSyntaxCheck::Token(*tmp,&array)) { + array.Close(); User::Leave(KErrSipCodecAcceptEncodingHeader); } + array.Close(); CleanupStack::Pop(tmp); delete iCodings; iCodings = tmp; diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Codec/src/SIPSyntaxCheck.cpp --- a/realtimenetprots/sipfw/SIP/Codec/src/SIPSyntaxCheck.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Codec/src/SIPSyntaxCheck.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -20,7 +20,6 @@ #include "SIPSyntaxCheck.h" -#include "TSIPChar.h" #include "sipcodecerr.h" #include @@ -31,8 +30,9 @@ // SIPSyntaxCheck::Token // ----------------------------------------------------------------------------- // -TBool SIPSyntaxCheck::Token (const TDesC8& aValue) +TBool SIPSyntaxCheck::Token (const TDesC8& aValue, RArray* aArray) { + if (aValue.Length() == 0) { return EFalse; @@ -41,7 +41,7 @@ TSIPChar sipChr = lex.Get(); while (sipChr) { - if (!sipChr.IsTokenChar()) + if (!sipChr.IsTokenChar( aArray ) ) { return EFalse; } diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Codec/src/SIPSyntaxCheck.h --- a/realtimenetprots/sipfw/SIP/Codec/src/SIPSyntaxCheck.h Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Codec/src/SIPSyntaxCheck.h Wed Jun 23 18:36:31 2010 +0300 @@ -31,6 +31,7 @@ #define SIPSYNTAXCHECK_H #include "siphostport.h" +#include "TSIPChar.h" #include @@ -39,7 +40,7 @@ { public: - static TBool Token (const TDesC8& aValue); + static TBool Token (const TDesC8& aValue , RArray* aArray = NULL ); static TBool AlphaMaxSize8 (const TDesC8& aValue); static TBool Host (const TDesC8& aValue); static TBool Word (const TDesC8& aValue); diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Codec/src/TSIPChar.h --- a/realtimenetprots/sipfw/SIP/Codec/src/TSIPChar.h Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Codec/src/TSIPChar.h Wed Jun 23 18:36:31 2010 +0300 @@ -45,7 +45,7 @@ inline TBool IsReserved() const; inline TBool IsUnreserved() const; inline TBool IsMark() const; - inline TBool IsTokenChar() const; + inline TBool IsTokenChar(RArray* aArray = NULL) const; inline TBool IsSeparator() const; inline TBool IsWordChar() const; inline TBool IsQuotedPairChar() const; diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Codec/src/TSIPChar.inl --- a/realtimenetprots/sipfw/SIP/Codec/src/TSIPChar.inl Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Codec/src/TSIPChar.inl Wed Jun 23 18:36:31 2010 +0300 @@ -112,20 +112,33 @@ // TSIPChar::IsTokenChar // ----------------------------------------------------------------------------- // -inline TBool TSIPChar::IsTokenChar () const +inline TBool TSIPChar::IsTokenChar (RArray* aArray) const { if (IsAlphaDigit()) { return ETrue; } - TSIPChar val = *this; - if (val == '-' || val == '.' || val == '!' || val == '%' || val == '*' || + TInt length= 0; + TSIPChar val = *this; + //Allowing '/' token for interoperability issues + if (aArray) + length = aArray->Count(); + if(length) + { + for (TInt i =0; ioperator [](i)) + return ETrue; + } + } + if (val == '-' || val == '.' || val == '!' || val == '%' || val == '*' || val == '_' || val == '+' || val == '\'' || val == '~' || val == '`') - { - return ETrue; - } - return EFalse; - } + { + return ETrue; + } + + return EFalse; + } // ----------------------------------------------------------------------------- // TSIPChar::IsSeparator diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CTransport.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -274,7 +274,7 @@ if ( IsConnectedTransport() ) { TResponseRoute route( id, aRemoteAddr ); - iIDArray.Append( route ); + iIDArray.AppendL( route ); } TRAP( leaveValue, receiver->ReceiveL( static_cast( aMessage ) ) ); diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/ConnectionMgr/src/TTlsTransTlsConnecting.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/TTlsTransTlsConnecting.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/TTlsTransTlsConnecting.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -22,8 +22,10 @@ #include "TTlsTransTlsConnecting.h" #include "MTlsTransStateOwner.h" - -const TInt KConnectTLSTimeout = 10000; // 10 seconds +// SIP layer waits 30 seconds for TLS Handshake to happen, if the timer +// fires and negotiation does not happen, it cancels the handshake assuming +// some problem while handshaking. +const TInt KConnectTLSTimeout = 30000; // 30 seconds // ----------------------------------------------------------------------------- // TTlsTransTlsConnecting::EnterL diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Group/sipcodec.mmp --- a/realtimenetprots/sipfw/SIP/Group/sipcodec.mmp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Group/sipcodec.mmp Wed Jun 23 18:36:31 2010 +0300 @@ -135,7 +135,8 @@ LIBRARY estor.lib LIBRARY charconv.lib LIBRARY inetprotutil.lib - +LIBRARY featdiscovery.lib + VENDORID 0x70000001 CAPABILITY All -Tcb diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/Server/src/CSipCSSession.cpp --- a/realtimenetprots/sipfw/SIP/Server/src/CSipCSSession.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/Server/src/CSipCSSession.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -252,7 +252,10 @@ { TInt handle = 0; ITC().ReadL(aMessage,handle,ESipItcArgSubSessionHandle); - CloseSubSession (handle); + if(iSubSessionIndex->AtL(handle)) + CloseSubSession (handle); + else + {} } break; diff -r 740ceea8e153 -r 3c8db403127f realtimenetprots/sipfw/SIP/sipapi/api/siperr.h --- a/realtimenetprots/sipfw/SIP/sipapi/api/siperr.h Fri Jun 11 14:01:23 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/sipapi/api/siperr.h Wed Jun 23 18:36:31 2010 +0300 @@ -93,4 +93,7 @@ /** ICMP error has occured */ const TInt KErrSIPICMPFailure = -17718; +/** Error code to indicate switching to secondary APN on non fatal error */ +const TInt KErrSIPApnSwitchNonFatalFailure = -17719; + #endif //SIPERR_H diff -r 740ceea8e153 -r 3c8db403127f rtp/srtpstack/inc/srtputils.h --- a/rtp/srtpstack/inc/srtputils.h Fri Jun 11 14:01:23 2010 +0300 +++ b/rtp/srtpstack/inc/srtputils.h Wed Jun 23 18:36:31 2010 +0300 @@ -29,6 +29,7 @@ #include #include +#include #ifdef SRTP_UNIT_TEST_COVERAGE diff -r 740ceea8e153 -r 3c8db403127f sipplugins/sippsystemstatemonitor/src/sipdevicestateaware.cpp --- a/sipplugins/sippsystemstatemonitor/src/sipdevicestateaware.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/sipplugins/sippsystemstatemonitor/src/sipdevicestateaware.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -219,8 +219,11 @@ if( iObservers.Count() == iCount) { iGuardTimer->Cancel(); - iStateAwareSession.AcknowledgeStateNotification(KErrNone); - iCount = 0; + if(iState == CSipSystemStateMonitor::ESystemOffline) + { + iStateAwareSession.AcknowledgeStateNotification(KErrNone); + iCount = 0; + } } } @@ -231,7 +234,10 @@ void CSipDeviceStateAware::EventProcessingCompleted() { iGuardTimer->Cancel(); - iStateAwareSession.AcknowledgeStateNotification(KErrNone); - iCount = 0; + if(iState == CSipSystemStateMonitor::ESystemOffline) + { + iStateAwareSession.AcknowledgeStateNotification(KErrNone); + iCount = 0; + } } diff -r 740ceea8e153 -r 3c8db403127f sipplugins/sippsystemstatemonitor/src/sipvpnmonitorao.cpp --- a/sipplugins/sippsystemstatemonitor/src/sipvpnmonitorao.cpp Fri Jun 11 14:01:23 2010 +0300 +++ b/sipplugins/sippsystemstatemonitor/src/sipvpnmonitorao.cpp Wed Jun 23 18:36:31 2010 +0300 @@ -191,9 +191,11 @@ // SIP deregistration has been completed. Stop the guard timer and tell // the VPN client about it. iGuardTimer->Cancel(); - - iProperty.Set( KPSVpnSipUid, KVpnSipState, ESipDeregisterCompleted ); - iCount = 0; + if (iState == CSipSystemStateMonitor::EVpnInitiating) + { + iProperty.Set( KPSVpnSipUid, KVpnSipState, ESipDeregisterCompleted ); + iCount = 0; + } } // -----------------------------------------------------------------------------