# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286142062 -10800 # Node ID 8134400f8f89b34cffd967036ee02871dcf4de94 # Parent e3fccba1f02fc67acd05193b41c5f45647798d89 Revision: 201037 Kit: 201039 diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/ProfileAgent/ApnManager/inc/sipapnconfigurationhandler.h --- a/realtimenetprots/sipfw/ProfileAgent/ApnManager/inc/sipapnconfigurationhandler.h Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/ApnManager/inc/sipapnconfigurationhandler.h Mon Oct 04 00:41:02 2010 +0300 @@ -122,8 +122,6 @@ void ChangeApnL( const TDesC8& aApn, TBool aUseSecureAuthentication ); - TBool ClearProtectedRecord( CommsDat::CCDRecordBase& aRecord ); - void SetMonitoringState( TSipApnMonitoringState aMonitoringState ); TSipApnMonitoringState MonitoringState() const; @@ -157,13 +155,6 @@ void AllowCellularDataUsage(); - - /** - * Rollsback db in case of failure - * @param aDb - */ - static void RollBackDBTransaction(TAny* aDb); - private: // Data MSIPApnChangeObserver& iObserver; diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/ProfileAgent/ApnManager/src/sipapnconfigurationhandler.cpp --- a/realtimenetprots/sipfw/ProfileAgent/ApnManager/src/sipapnconfigurationhandler.cpp Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/ApnManager/src/sipapnconfigurationhandler.cpp Mon Oct 04 00:41:02 2010 +0300 @@ -579,9 +579,6 @@ CMDBSession* db = CMDBSession::NewL( KCDVersion1_1 ); CleanupStack::PushL( db ); - db->OpenTransactionL(); - CleanupStack::PushL(TCleanupItem(RollBackDBTransaction, db)); - // Set attributes so that also protected iaps can be accessed db->SetAttributeMask( ECDHidden | ECDProtectedWrite ); @@ -592,8 +589,6 @@ CleanupStack::PushL( iapRecord ); iapRecord->SetRecordId( iIapId ); - - TBool clearedProtectedIap = ClearProtectedRecord( *iapRecord ); iapRecord->LoadL( *db ); @@ -615,8 +610,6 @@ CCDOutgoingGprsRecord* serviceRecord = static_cast( iapRecord->iService.iLinkedRecord ); - - TBool clearedProtectedService = ClearProtectedRecord( *serviceRecord ); PROFILE_DEBUG6( "CSIPApnConfigurationHandler::ChangeApnL() curr apn", @@ -637,30 +630,17 @@ PROFILE_DEBUG3( "CSIPApnConfigurationHandler::ChangeApnL() new security", aUseSecureAuthentication ) - - serviceRecord->ModifyL( *db ); - - if ( clearedProtectedIap ) + + TRAPD(err, serviceRecord->ModifyL( *db )); + if (err != KErrNone) { - // Set protection back - iapRecord->SetAttributes( ECDProtectedWrite ); - iapRecord->ModifyL( *db ); - } + PROFILE_DEBUG3( "CSIPApnConfigurationHandler::ChangeApnL,ModifyL leaves",err ) + User::Leave(err); + } - if ( clearedProtectedService ) - { - // Set protection back - serviceRecord->SetAttributes( ECDProtectedWrite ); - serviceRecord->ModifyL( *db ); - } - db->ClearAttributeMask( ECDHidden | ECDProtectedWrite ); CleanupStack::PopAndDestroy( iapRecord ); - - db->CommitTransactionL(); - - CleanupStack::Pop(); //cleanup item CleanupStack::PopAndDestroy( db ); @@ -676,22 +656,6 @@ } // ----------------------------------------------------------------------------- -// CSIPApnConfigurationHandler::ClearProtectedRecord -// ----------------------------------------------------------------------------- -// -TBool CSIPApnConfigurationHandler::ClearProtectedRecord( - CommsDat::CCDRecordBase& aRecord ) - { - TBool cleared( EFalse ); - if ( aRecord.IsSetAttribute( CommsDat::ECDProtectedWrite ) ) - { - aRecord.ClearAttributes( CommsDat::ECDProtectedWrite ); - cleared = ETrue; - } - return cleared; - } - -// ----------------------------------------------------------------------------- // CSIPApnConfigurationHandler::SetMonitoringState // ----------------------------------------------------------------------------- // @@ -936,14 +900,4 @@ PROFILE_DEBUG1("DatabaseMonitoringCompletedL::AllowCellularDataUsage Exit" ); } -// ----------------------------------------------------------------------------- -// CSIPApnConfigurationHandler::RollBackDBTransaction -// ----------------------------------------------------------------------------- -// -void CSIPApnConfigurationHandler::RollBackDBTransaction(TAny* aDb) - { - CMDBSession* db = static_cast(aDb); - TRAP_IGNORE(db->RollbackTransactionL()); - } - // End of file diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/CSIPRegEventSubscriber.cpp --- a/realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/CSIPRegEventSubscriber.cpp Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/IMS_Agent/Src/CSIPRegEventSubscriber.cpp Mon Oct 04 00:41:02 2010 +0300 @@ -21,13 +21,7 @@ // INCLUDE FILES -#include "CSIPRegEventSubscriber.h" -#include "CSIPNotifyXmlBodyParser.h" -#include "sipreginfoelement.h" -#include "TSIPRegEventStateNotSubscribed.h" -#include "TSIPRegEventStateSubscribing.h" -#include "TSIPRegEventStateSubscribed.h" -#include "TSIPRegEventStateReSubscribing.h" +#include #include "sipfromheader.h" #include "siptoheader.h" #include "sipeventheader.h" @@ -42,7 +36,14 @@ #include "siperr.h" #include "sipstrings.h" #include "sipstrconsts.h" -#include +#include "CSIPRegEventSubscriber.h" +#include "CSIPNotifyXmlBodyParser.h" +#include "sipreginfoelement.h" +#include "TSIPRegEventStateNotSubscribed.h" +#include "TSIPRegEventStateSubscribing.h" +#include "TSIPRegEventStateSubscribed.h" +#include "TSIPRegEventStateReSubscribing.h" + _LIT8(KRegEventName, "reg"); diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCacheItem.cpp Mon Oct 04 00:41:02 2010 +0300 @@ -765,10 +765,23 @@ { PROFILE_DEBUG4("ProfileCacheItem::HandleError id,err", ProfileId(), aError) + TBool updateProfile(HasProfileUpdate() && iCurrentState->Name() == + CSIPConcreteProfile::EUnregistrationInProgress); if (iCurrentState->ErrorOccurred(*this, aError)) { PROFILE_DEBUG1("ProfileCacheItem::HandleError go unregistered") - + + if(updateProfile) + { + PROFILE_DEBUG1("CSIPProfileCacheItem::HandleError ChangeStateL") + StopSnapMonitoring(); + TRAPD(err, ChangeStateL(&iServerCore.UnregisteredState())); + if (err == KErrNone) + { + return EFalse; + } + } + PROFILE_DEBUG1("CSIPProfileCacheItem::HandleError SwitchToUnregisteredState") if(SwitchToUnregisteredState(ETrue)) { return EFalse; diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/Sipprofilecontextbase.cpp --- a/realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/Sipprofilecontextbase.cpp Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/profile_fsm/src/Sipprofilecontextbase.cpp Mon Oct 04 00:41:02 2010 +0300 @@ -21,6 +21,7 @@ // INCLUDE FILES #include +#include #include "sipprofilecontextbase.h" #include "sipgendefs.h" #include "SipProfileLog.h" @@ -41,7 +42,8 @@ #include "sipstrconsts.h" #include "sipmanagedprofile.h" #include "sip.h" -#include + + const TInt KMicroSecsInSec = 1000000; _LIT8(KTmpSipUri, "sip:tmp"); diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/SIP/ConnectionMgr/src/CStateModel.cpp --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CStateModel.cpp Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CStateModel.cpp Mon Oct 04 00:41:02 2010 +0300 @@ -129,15 +129,6 @@ } // ---------------------------------------------------------------------------- -// CStateModel::State -// ---------------------------------------------------------------------------- -// -TStateBase& CStateModel::State() const - { - return const_cast< TStateBase& >( iStates.At( iStateValue ) ); - } - -// ---------------------------------------------------------------------------- // CStateModel::Error // ---------------------------------------------------------------------------- // diff -r e3fccba1f02f -r 8134400f8f89 realtimenetprots/sipfw/SIP/ConnectionMgr/src/CStateModel.h --- a/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CStateModel.h Fri Sep 17 08:32:30 2010 +0300 +++ b/realtimenetprots/sipfw/SIP/ConnectionMgr/src/CStateModel.h Mon Oct 04 00:41:02 2010 +0300 @@ -89,7 +89,10 @@ private: // New methods /// @return Reference to the active state instance. - inline TStateBase& State() const; + inline TStateBase& State() const + { + return const_cast< TStateBase& >( iStates.At( iStateValue ) ); + } private: // Constructors diff -r e3fccba1f02f -r 8134400f8f89 sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp --- a/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp Fri Sep 17 08:32:30 2010 +0300 +++ b/sipplugins/sippsipadapter/src/CWPSIPAdapter.cpp Mon Oct 04 00:41:02 2010 +0300 @@ -840,11 +840,22 @@ CSIPProfile* profile = NULL; profile = registry->ProfileL( iDatas[counter]->GetProfileId() ); + CleanupStack::PushL( profile ); CSIPManagedProfile* managedProfile = static_cast( profile ); + + CleanupStack::PushL( managedProfile ); + managedProfile->SetParameter( KSIPSnapId, (TUint32)snapId ); registry->SaveL( *managedProfile ); + + CleanupStack::PopAndDestroy(managedProfile); + + CleanupStack::Pop( profile ); + profile = NULL; + + CleanupStack::PopAndDestroy( 2, observer ); // CS:0 } else diff -r e3fccba1f02f -r 8134400f8f89 sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconevents.h --- a/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconevents.h Fri Sep 17 08:32:30 2010 +0300 +++ b/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconevents.h Mon Oct 04 00:41:02 2010 +0300 @@ -137,6 +137,6 @@ static CSubConNotificationEvent* NewL(TAny* aConstructionParameters); }; -#include "sip_subconevents.inl" +#include #endif // SIPSCPR_SUBCONEVENTS_H diff -r e3fccba1f02f -r 8134400f8f89 sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconparams.h --- a/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconparams.h Fri Sep 17 08:32:30 2010 +0300 +++ b/sipproviderplugins/sipprovider/sipconnectionplugins/inc/SIP_subconparams.h Mon Oct 04 00:41:02 2010 +0300 @@ -272,6 +272,6 @@ static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); }; -#include "sip_subconparams.inl" +#include #endif // SIP_SUBCONPARAMS_H