394 CSIPProfileCacheItem* item = ProfileCacheItem(aProfile.Id()); |
394 CSIPProfileCacheItem* item = ProfileCacheItem(aProfile.Id()); |
395 if (!item) |
395 if (!item) |
396 { |
396 { |
397 return EFalse; |
397 return EFalse; |
398 } |
398 } |
399 |
399 |
400 if((aError != KErrNone) && item->HasQueuedUpdate()) |
|
401 { |
|
402 PROFILE_DEBUG4("ProfileServerCore::ProceedRegistration HasQueuedUpdate, err", |
|
403 item->HasQueuedUpdate(), aError) |
|
404 return EFalse; |
|
405 } |
|
406 |
|
407 if ( ShouldChangeIap(item->UsedProfile(), aError) && |
400 if ( ShouldChangeIap(item->UsedProfile(), aError) && |
408 !item->SnapRetryCountReached() ) |
401 !item->SnapRetryCountReached() ) |
409 { |
402 { |
410 PROFILE_DEBUG1("CSIPProfileServerCore::ProceedRegistration, IAP should be changed") |
403 PROFILE_DEBUG1("CSIPProfileServerCore::ProceedRegistration, IAP should be changed") |
411 // If IAP should be changed, handle this like an error, so the profile |
404 // If IAP should be changed, handle this like an error, so the profile |
1571 { |
1564 { |
1572 TInt index = iObservers.Find(&aObserver); |
1565 TInt index = iObservers.Find(&aObserver); |
1573 if (index != KErrNotFound) |
1566 if (index != KErrNotFound) |
1574 { |
1567 { |
1575 iObservers.Remove(index); |
1568 iObservers.Remove(index); |
1576 iObservers.Compress(); |
|
1577 } |
1569 } |
1578 |
1570 |
1579 for (TInt i = 0; i < iProfileCache.Count(); i ++) |
1571 for (TInt i = 0; i < iProfileCache.Count(); i ++) |
1580 { |
1572 { |
1581 CSIPProfileCacheItem* item = iProfileCache[i]; |
1573 CSIPProfileCacheItem* item = iProfileCache[i]; |
1913 // ----------------------------------------------------------------------------- |
1904 // ----------------------------------------------------------------------------- |
1914 // CSIPProfileServerCore::MigrationControllerL |
1905 // CSIPProfileServerCore::MigrationControllerL |
1915 // ----------------------------------------------------------------------------- |
1906 // ----------------------------------------------------------------------------- |
1916 // |
1907 // |
1917 CSipAlrMigrationController& |
1908 CSipAlrMigrationController& |
1918 CSIPProfileServerCore::MigrationControllerL(TSipSNAPConfigurationData aSnapData) |
1909 CSIPProfileServerCore::MigrationControllerL(TUint32 aSnapId) |
1919 { |
1910 { |
1920 RemoveUnusedMigrationControllers(aSnapData.iSnapId); |
1911 RemoveUnusedMigrationControllers(aSnapId); |
1921 |
1912 |
1922 for (TInt i = 0; i < iMigrationControllers.Count(); ++i) |
1913 for (TInt i = 0; i < iMigrationControllers.Count(); ++i) |
1923 { |
1914 { |
1924 // Migration controller is unique based on the SNAP ID and Bearer ID. |
1915 if (iMigrationControllers[i]->SnapId() == aSnapId) |
1925 if (iMigrationControllers[i]->SnapId() == aSnapData.iSnapId |
|
1926 && iMigrationControllers[i]->BearerId() == aSnapData.iBearerId) |
|
1927 { |
1916 { |
1928 return *iMigrationControllers[i]; |
1917 return *iMigrationControllers[i]; |
1929 } |
1918 } |
1930 } |
1919 } |
1931 |
1920 |
1932 CSipAlrMigrationController* ctrl = |
1921 CSipAlrMigrationController* ctrl = |
1933 CSipAlrMigrationController::NewLC(iAlrHandler->AlrMonitorL(),aSnapData); |
1922 CSipAlrMigrationController::NewLC(iAlrHandler->AlrMonitorL(), aSnapId); |
1934 iMigrationControllers.AppendL(ctrl); |
1923 iMigrationControllers.AppendL(ctrl); |
1935 CleanupStack::Pop(ctrl); |
1924 CleanupStack::Pop(ctrl); |
1936 return *ctrl; |
1925 return *ctrl; |
1937 } |
1926 } |
1938 |
1927 |
1970 if (!iMigrationControllers[i]->IsUsed() && |
1958 if (!iMigrationControllers[i]->IsUsed() && |
1971 iMigrationControllers[i]->SnapId() != aSnapId) |
1959 iMigrationControllers[i]->SnapId() != aSnapId) |
1972 { |
1960 { |
1973 CSipAlrMigrationController* unused = iMigrationControllers[i]; |
1961 CSipAlrMigrationController* unused = iMigrationControllers[i]; |
1974 iMigrationControllers.Remove(i); |
1962 iMigrationControllers.Remove(i); |
1975 iMigrationControllers.Compress(); |
|
1976 delete unused; |
1963 delete unused; |
1977 unused = NULL; |
|
1978 } |
1964 } |
1979 } |
1965 } |
1980 } |
1966 } |
1981 |
1967 |
1982 // ----------------------------------------------------------------------------- |
1968 // ----------------------------------------------------------------------------- |