1385 ,iIsjobStartedFromUI, iSanValue ); |
1385 ,iIsjobStartedFromUI, iSanValue ); |
1386 CleanupStack::PopAndDestroy( &sml ); |
1386 CleanupStack::PopAndDestroy( &sml ); |
1387 |
1387 |
1388 // 2/3 GET IAP FROM ESOCK ---------------------------------------------- |
1388 // 2/3 GET IAP FROM ESOCK ---------------------------------------------- |
1389 // resolve which accespoint is used for current DM session |
1389 // resolve which accespoint is used for current DM session |
1390 if ( profIapid == KErrNotFound && aIapid==KErrNotFound) |
1390 if ( (profIapid == KErrNotFound || profIapid == KErrGeneral) |
|
1391 && aIapid==KErrNotFound) |
1391 { |
1392 { |
1392 RSocketServ serv; |
1393 RSocketServ serv; |
1393 CleanupClosePushL( serv ); |
1394 CleanupClosePushL( serv ); |
1394 User::LeaveIfError( serv.Connect() ); |
1395 User::LeaveIfError( serv.Connect() ); |
1395 |
1396 |
1449 } |
1450 } |
1450 } |
1451 } |
1451 CleanupStack::PopAndDestroy( 2 ); // conn, serv |
1452 CleanupStack::PopAndDestroy( 2 ); // conn, serv |
1452 } |
1453 } |
1453 TInt newIapid( KErrNotFound ); |
1454 TInt newIapid( KErrNotFound ); |
1454 if ( sockIapid!=KErrNotFound ) newIapid = sockIapid; |
1455 if ( sockIapid!=KErrNotFound ) newIapid = sockIapid; |
1455 if ( profIapid!=KErrNotFound ) newIapid = profIapid; |
1456 if ( profIapid!=KErrNotFound && profIapid != KErrGeneral ) newIapid = profIapid; |
1456 if ( aIapid !=KErrNotFound ) newIapid = aIapid; |
1457 if ( aIapid !=KErrNotFound ) newIapid = aIapid; |
1457 |
1458 |
1458 //Do some intelligent work during resume |
1459 //Do some intelligent work during resume |
1459 /* Some rules.. |
1460 /* Some rules.. |
1460 * 1. If IAP is always ask in DM profile, use the earlier set during FMS trigger |
1461 * 1. If IAP is always ask in DM profile, use the earlier set during FMS trigger |
1466 RProperty::Get( TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, active ); |
1467 RProperty::Get( TUid::Uid(KOmaDMAppUid), KFotaDownloadActive, active ); |
1467 FLOG(_L("active = %d"),active); |
1468 FLOG(_L("active = %d"),active); |
1468 if (active==EFalse && iDLState.iState == RFotaEngineSession::EDownloadProgressingWithResume) |
1469 if (active==EFalse && iDLState.iState == RFotaEngineSession::EDownloadProgressingWithResume) |
1469 { |
1470 { |
1470 //Actual resume only |
1471 //Actual resume only |
1471 if (!iUserInitiatedResume && profIapid == KErrNotFound ) |
1472 if (!iUserInitiatedResume && (profIapid == KErrNotFound || profIapid == KErrGeneral ) ) |
1472 { |
1473 { |
1473 //FMS triggered resume, apply Rule 1 |
1474 //FMS triggered resume, apply Rule 1 |
1474 newIapid = iDLState.iIapId; |
1475 newIapid = iDLState.iIapId; |
1475 } |
1476 } |
1476 else if (profIapid == KErrNotFound) |
1477 else if (profIapid == KErrNotFound || profIapid == KErrGeneral ) |
1477 { |
1478 { |
1478 //User triggered resume, apply Rule 2 |
1479 //User triggered resume, apply Rule 2 |
1479 newIapid = KErrNotFound; |
1480 newIapid = KErrNotFound; |
1480 } |
1481 } |
1481 else if (profIapid != iDLState.iIapId) |
1482 else if (profIapid != iDLState.iIapId && profIapid > KErrNone) |
1482 { |
1483 { |
1483 //IAP has changed in DM profile, apply Rule 3 |
1484 //IAP has changed in DM profile, apply Rule 3 |
1484 newIapid = profIapid; |
1485 newIapid = profIapid; |
1485 } |
1486 } |
1486 } |
1487 } |