equal
deleted
inserted
replaced
327 CSipAlrMigrationController::SendMigrationResult(TUint32 aIapId, TBool aAllowed) |
327 CSipAlrMigrationController::SendMigrationResult(TUint32 aIapId, TBool aAllowed) |
328 { |
328 { |
329 PROFILE_DEBUG5("CSipAlrMigrCtrl::SendMigrationResult iap,allow,obsCount", |
329 PROFILE_DEBUG5("CSipAlrMigrCtrl::SendMigrationResult iap,allow,obsCount", |
330 aIapId, |
330 aIapId, |
331 aAllowed, |
331 aAllowed, |
332 iObservers.Count()) |
332 iObservers.Count()) |
333 |
333 |
334 for (TInt i = 0; i < iObservers.Count(); ++i) |
334 //Get the initial count of Observers |
|
335 TInt count = iObservers.Count();; |
|
336 for (TInt i = 0; i < count; ++i) |
335 { |
337 { |
336 MSipAlrMigrationObserver& obs = iObservers[i].iObserver; |
338 MSipAlrMigrationObserver& obs = iObservers[i].iObserver; |
337 TRAPD(err, if (aAllowed) |
339 TRAPD(err, if (aAllowed) |
338 { |
340 { |
339 obs.MigrationIsAllowedL(aIapId); |
341 obs.MigrationIsAllowedL(aIapId); |
346 if (err != KErrNone) |
348 if (err != KErrNone) |
347 { |
349 { |
348 PROFILE_DEBUG4("MigrationIs(Dis)AllowedL leaves err,index", err, i) |
350 PROFILE_DEBUG4("MigrationIs(Dis)AllowedL leaves err,index", err, i) |
349 obs.ErrorOccurred(err); |
351 obs.ErrorOccurred(err); |
350 } |
352 } |
|
353 // Check the Observer Count. It may be possible that Profile Could Not |
|
354 // be registered (if migration is allowed). In such cases error handling |
|
355 // for profile will be done, which will move Profile into Un-registered State |
|
356 // As the profile moves into Un-registered state, profile is detached from |
|
357 // the list of Observer which AlrMigrationController maintains. This dynamically |
|
358 // changes the Observer count. |
|
359 if(iObservers.Count() < count) |
|
360 i--; |
|
361 count = iObservers.Count(); |
351 } |
362 } |
352 } |
363 } |
353 |
364 |
354 // ----------------------------------------------------------------------------- |
365 // ----------------------------------------------------------------------------- |
355 // CSipAlrMigrationController::FindIndex |
366 // CSipAlrMigrationController::FindIndex |