realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCSSession.cpp
branchRCL_3
changeset 9 1e1cc61f56c3
parent 0 307788aac0a8
child 16 43c4dec3cb1f
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCSSession.cpp	Fri Feb 19 23:10:33 2010 +0200
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/SipProfileCSSession.cpp	Fri Mar 12 15:44:11 2010 +0200
@@ -249,13 +249,21 @@
     {
 	HBufC8* profileBuf = iHelper.ReadLC(ESipProfileItcArgProfile,aMessage);
 	CSIPConcreteProfile* profile = InternalizeProfileLC(*profileBuf);
-    TBool canProceed = iCore.UpdateProfileToStoreL(profile, *this);
-    CleanupStack::Pop(profile);
-    CleanupStack::PopAndDestroy(profileBuf);
-    if (canProceed)
-    	{
-    	iCore.UpdateRegistrationL(profile->Id(), *this);
-    	}
+	TBool updateAllowed = iCore.IsUpdateAllowed(profile);
+	if(updateAllowed)
+	    {
+        TBool canProceed = iCore.UpdateProfileToStoreL(profile, *this);
+        CleanupStack::Pop(profile);
+        CleanupStack::PopAndDestroy(profileBuf);
+        if (canProceed)
+            {
+            iCore.UpdateRegistrationL(profile->Id(), *this);
+            }
+	    }
+	else
+	    {
+	    User::Leave(KErrNotSupported);
+	    }
     }
 
 // -----------------------------------------------------------------------------