505 } |
505 } |
506 if(!waitForDeregistration) |
506 if(!waitForDeregistration) |
507 { |
507 { |
508 ConfirmSystemstateMonitor(CSipSystemStateMonitor::ESystemState); |
508 ConfirmSystemstateMonitor(CSipSystemStateMonitor::ESystemState); |
509 } |
509 } |
510 } //end if Offline |
510 } //end if Offline |
511 |
|
512 //If the System receives Online event |
|
513 if(aValue == CSipSystemStateMonitor::ESystemOnline) |
|
514 { |
|
515 for (TInt i = 0; i < iProfileCache.Count(); i++) |
|
516 { |
|
517 CSIPProfileCacheItem* item = iProfileCache[i]; |
|
518 item->OfflineInitiated(EFalse); |
|
519 CSIPConcreteProfile::TStatus status; |
|
520 iPluginDirector->State(status, item->UsedProfile()); |
|
521 if (item->IsReferred() && status == CSIPConcreteProfile::EUnregistered) |
|
522 { |
|
523 TRAPD(err, item->StartRegisterL(*iWaitForIAP, *iRegInProg, ETrue)); |
|
524 if (err != KErrNone) |
|
525 { |
|
526 HandleAsyncError(*item,CSIPConcreteProfile::ERegistrationInProgress,err); |
|
527 } |
|
528 } |
|
529 } |
|
530 } //end if Online |
|
531 } //end if SystemState |
511 } //end if SystemState |
532 else if(aVariable == CSipSystemStateMonitor::ERfsState) |
512 else if(aVariable == CSipSystemStateMonitor::ERfsState) |
533 { |
513 { |
534 if(aValue == CSipSystemStateMonitor::ERfsStarted) |
514 if(aValue == CSipSystemStateMonitor::ERfsStarted) |
535 { |
515 { |
1904 // ----------------------------------------------------------------------------- |
1884 // ----------------------------------------------------------------------------- |
1905 // CSIPProfileServerCore::MigrationControllerL |
1885 // CSIPProfileServerCore::MigrationControllerL |
1906 // ----------------------------------------------------------------------------- |
1886 // ----------------------------------------------------------------------------- |
1907 // |
1887 // |
1908 CSipAlrMigrationController& |
1888 CSipAlrMigrationController& |
1909 CSIPProfileServerCore::MigrationControllerL(TUint32 aSnapId) |
1889 CSIPProfileServerCore::MigrationControllerL(TSipSNAPConfigurationData aSnapData) |
1910 { |
1890 { |
1911 RemoveUnusedMigrationControllers(aSnapId); |
1891 RemoveUnusedMigrationControllers(aSnapData.iSnapId); |
1912 |
1892 |
1913 for (TInt i = 0; i < iMigrationControllers.Count(); ++i) |
1893 for (TInt i = 0; i < iMigrationControllers.Count(); ++i) |
1914 { |
1894 { |
1915 if (iMigrationControllers[i]->SnapId() == aSnapId) |
1895 // Migration controller is unique based on the SNAP ID and Bearer ID. |
|
1896 if (iMigrationControllers[i]->SnapId() == aSnapData.iSnapId |
|
1897 && iMigrationControllers[i]->BearerId() == aSnapData.iBearerId) |
1916 { |
1898 { |
1917 return *iMigrationControllers[i]; |
1899 return *iMigrationControllers[i]; |
1918 } |
1900 } |
1919 } |
1901 } |
1920 |
1902 |
1921 CSipAlrMigrationController* ctrl = |
1903 CSipAlrMigrationController* ctrl = |
1922 CSipAlrMigrationController::NewLC(iAlrHandler->AlrMonitorL(), aSnapId); |
1904 CSipAlrMigrationController::NewLC(iAlrHandler->AlrMonitorL(),aSnapData); |
1923 iMigrationControllers.AppendL(ctrl); |
1905 iMigrationControllers.AppendL(ctrl); |
1924 CleanupStack::Pop(ctrl); |
1906 CleanupStack::Pop(ctrl); |
1925 return *ctrl; |
1907 return *ctrl; |
1926 } |
1908 } |
1927 |
1909 |
2208 { |
2190 { |
2209 CSIPProfileCacheItem* item = self->iProfileCache[i]; |
2191 CSIPProfileCacheItem* item = self->iProfileCache[i]; |
2210 CSIPConcreteProfile::TStatus status; |
2192 CSIPConcreteProfile::TStatus status; |
2211 self->iPluginDirector->State( status, self->iProfileCache[i]->UsedProfile() ); |
2193 self->iPluginDirector->State( status, self->iProfileCache[i]->UsedProfile() ); |
2212 item->OfflineInitiated(EFalse); |
2194 item->OfflineInitiated(EFalse); |
2213 if (item->IsReferred() && (!self->iApnManager->IsIapGPRSL(item->Profile().IapId())) |
2195 if (item->IsReferred() && (status == CSIPConcreteProfile::EUnregistered) ) |
2214 && status == CSIPConcreteProfile::EUnregistered) |
|
2215 { |
2196 { |
2216 TRAPD(err, item->StartRegisterL(*(self->iWaitForIAP), *(self->iRegInProg), ETrue)); |
2197 TRAPD(err, item->StartRegisterL(*(self->iWaitForIAP), *(self->iRegInProg), ETrue)); |
2217 if (err != KErrNone) |
2198 if (err != KErrNone) |
2218 { |
2199 { |
2219 self->HandleAsyncError(*item,CSIPConcreteProfile::ERegistrationInProgress,err); |
2200 self->HandleAsyncError(*item,CSIPConcreteProfile::ERegistrationInProgress,err); |