realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp
changeset 15 8248b03a2669
parent 0 307788aac0a8
child 37 0295359a7673
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp	Tue Feb 02 01:03:15 2010 +0200
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp	Fri Apr 16 15:18:54 2010 +0300
@@ -329,9 +329,14 @@
 	PROFILE_DEBUG5("CSipAlrMigrCtrl::SendMigrationResult iap,allow,obsCount",
 				   aIapId,
 				   aAllowed,
-				   iObservers.Count())	
-
-	for (TInt i = 0; i < iObservers.Count(); ++i)
+				   iObservers.Count())
+	    
+		// It may be possible that Profile Could not be registered (if migration is allowed). In such cases error handling
+        // for profile will be done, which will move Profile into Un-registered State
+        // As the profile moves into Un-registered state, profile is detached from
+        // the list of Observer which AlrMigrationController maintains. This dynamically
+        // changes the Observer count.
+	    for (TInt i = iObservers.Count() -1; i >= 0; --i)
 		{
 		MSipAlrMigrationObserver& obs = iObservers[i].iObserver;
 		TRAPD(err, if (aAllowed)