realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp
branchRCL_3
changeset 12 c2e8c8b73582
parent 4 dd3853b8dc3f
child 41 f54bfd820e04
--- a/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp	Mon Mar 15 12:42:05 2010 +0200
+++ b/realtimenetprots/sipfw/ProfileAgent/Server/Src/sipalrmigrationcontroller.cpp	Wed Mar 31 22:10:27 2010 +0300
@@ -331,9 +331,12 @@
 				   aAllowed,
 				   iObservers.Count())
 	    
-	    //Get the initial count of Observers
-	    TInt count = iObservers.Count();;
-	    for (TInt i = 0; i < count; ++i)
+		// 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)
@@ -350,15 +353,6 @@
 			PROFILE_DEBUG4("MigrationIs(Dis)AllowedL leaves err,index", err, i)
 			obs.ErrorOccurred(err);
 			}
-		// Check the Observer 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.
-        if(iObservers.Count() < count)
-              i--;
-        count = iObservers.Count();
 		}
 	}