# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1273584765 -10800 # Node ID 8517a9ac4a2388e22995eb672a9d2b9f607d62e9 # Parent 43c4dec3cb1fb5ef927f2bf6f6e86f5ed6e952ae Revision: 201017 Kit: 201019 diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/Data/101f413c.cre Binary file realtimenetprots/sipfw/Data/101f413c.cre has changed diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/Group/bld.inf --- a/realtimenetprots/sipfw/Group/bld.inf Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/Group/bld.inf Tue May 11 16:32:45 2010 +0300 @@ -35,8 +35,6 @@ ../Data/101F413C.txt z:/private/10202be9/101f413c.txt // ProfileAgent's cenrep configuration file for expiry duration ../Data/2001F889.txt z:/private/10202be9/2001f889.txt -// ProfileAgent's default cre file -../Data/101f413c.cre z:/private/10202be9/101f413c.cre // ConfML files ../conf/sipframework.confml MW_LAYER_EXPORTS_CONFML(sipframework.confml) diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Group/sipietfagent.mmp --- a/realtimenetprots/sipfw/ProfileAgent/Group/sipietfagent.mmp Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Group/sipietfagent.mmp Tue May 11 16:32:45 2010 +0300 @@ -60,6 +60,6 @@ VENDORID 0x70000001 -CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData +CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData NetworkControl SMPSAFE diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Group/sipimsagent.mmp --- a/realtimenetprots/sipfw/ProfileAgent/Group/sipimsagent.mmp Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Group/sipimsagent.mmp Tue May 11 16:32:45 2010 +0300 @@ -87,6 +87,6 @@ VENDORID 0x70000001 -CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData +CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData NetworkControl SMPSAFE diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Group/sipprofilefsm.mmp --- a/realtimenetprots/sipfw/ProfileAgent/Group/sipprofilefsm.mmp Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Group/sipprofilefsm.mmp Tue May 11 16:32:45 2010 +0300 @@ -58,6 +58,6 @@ VENDORID 0x70000001 -CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData +CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData NetworkControl SMPSAFE diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Group/sipprofileserver.mmp --- a/realtimenetprots/sipfw/ProfileAgent/Group/sipprofileserver.mmp Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Group/sipprofileserver.mmp Tue May 11 16:32:45 2010 +0300 @@ -97,7 +97,7 @@ VENDORID 0x70000001 -CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData +CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData NetworkControl // MACRO PLAT_SEC_TEST diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Group/sipproxyrsv.mmp --- a/realtimenetprots/sipfw/ProfileAgent/Group/sipproxyrsv.mmp Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Group/sipproxyrsv.mmp Tue May 11 16:32:45 2010 +0300 @@ -43,6 +43,6 @@ VENDORID 0x70000001 -CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData +CAPABILITY ProtServ NetworkServices ReadDeviceData WriteDeviceData NetworkControl SMPSAFE diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h --- a/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Inc/SipProfileServerCore.h Tue May 11 16:32:45 2010 +0300 @@ -770,9 +770,23 @@ */ TBool CheckIapSettings(TUint32 aProfileId); + /** + * Issues the change of APN to PrimaryAPN + */ void UsePrimaryApn(TUint32 aIapId); - + + /** + * Issues the change of APN to SecondaryAPN + */ void UseBackupApn( TUint32 aIapId, TBool aFatalFailure = ETrue ); + + /** + * Compares the two plugin typr info + * @returns ETrue if the match completely + * EFalse otherwise + */ + static TBool Compare(const TSIPProfileTypeInfo& first, + const TSIPProfileTypeInfo& second); private: // Data diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp --- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileServerCore.cpp Tue May 11 16:32:45 2010 +0300 @@ -622,7 +622,12 @@ CImplementationInformation* ecomInfo = infoArray[i]; TSIPProfileTypeInfo info; ConvertTypeInfoL(*ecomInfo, info); - array.AppendL(info); + TIdentityRelation identityRelation(CSIPProfileServerCore::Compare); + TInt alreadyExits = array.Find(info,identityRelation); + if(alreadyExits == KErrNotFound) + { + array.AppendL(info); + } } } CleanupStack::Pop(&infoArray); @@ -1067,7 +1072,15 @@ } } else - User::LeaveIfError(KErrNotSupported); + { + // At this point the registration has failed fatally already and profile will be in + // unregistered state. Since we cann't do any regisrtation related activity and + // not to lose user's updated data we are doing this. + if(item->UsedProfile().Status() == CSIPConcreteProfile::EUnregistered) + { + item->ClearOldProfile(); + } + } } else { @@ -2353,11 +2366,34 @@ } // ---------------------------------------------------------------------------- +// CSIPProfileServerCore::Compare +// ---------------------------------------------------------------------------- +// +TBool CSIPProfileServerCore::Compare(const TSIPProfileTypeInfo& first, + const TSIPProfileTypeInfo& second) + { + TInt result = first.iSIPProfileName.Compare(second.iSIPProfileName); + return ( 0 == result && first.iSIPProfileClass == second.iSIPProfileClass); + } + +// ---------------------------------------------------------------------------- // CSIPProfileServerCore::IsUpdateAllowed // ---------------------------------------------------------------------------- // TBool CSIPProfileServerCore::IsUpdateAllowed( CSIPConcreteProfile *aProfile ) { - PROFILE_DEBUG1("CSIPIMSProfileAgent::IsUpdateAllowed, enter") - return !(iApnManager->IsFailed(aProfile->IapId())); + PROFILE_DEBUG1("CSIPProfileServerCore::IsUpdateAllowed, enter") + TBool allowed(ETrue); + CSIPProfileCacheItem* item = ProfileCacheItem(aProfile->Id()); + if(item) + { + CSIPConcreteProfile& profile = item->LatestProfile(); + TBool iapIdChange(profile.IapId()!=aProfile->IapId()); + if(iapIdChange && + (iApnManager->IsFailed(aProfile->IapId()) || iApnManager->IsFailed(profile.IapId()))) + { + allowed = EFalse; + } + } + return allowed; } diff -r 43c4dec3cb1f -r 8517a9ac4a23 realtimenetprots/sipfw/rom/sipsw.iby --- a/realtimenetprots/sipfw/rom/sipsw.iby Tue Apr 27 17:00:49 2010 +0300 +++ b/realtimenetprots/sipfw/rom/sipsw.iby Tue May 11 16:32:45 2010 +0300 @@ -108,9 +108,6 @@ /* Resources - XML for secure profile backup*/ data=ZPRIVATE\101F413C\backup_registration.xml private\101F413C\backup_registration.xml -// ProfileAgent's default cre file -data=DATAZ_\private\10202be9\101f413c.cre private\10202be9\101f413c.cre - #endif /* SYMBIAN_EXCLUDE_SIP*/ #endif /* __SIPSW_IBY__ */