equal
deleted
inserted
replaced
398 |
398 |
399 TInt idx(iCertificates.FindByValue(*p) ); |
399 TInt idx(iCertificates.FindByValue(*p) ); |
400 if (idx == KErrNotFound) |
400 if (idx == KErrNotFound) |
401 { |
401 { |
402 RDEBUG_2( "CDeliveryComponentStorage::NewComponentL - TCertInfoPckg NOT found 0x%X", reinterpret_cast<TUint>( p ) ); |
402 RDEBUG_2( "CDeliveryComponentStorage::NewComponentL - TCertInfoPckg NOT found 0x%X", reinterpret_cast<TUint>( p ) ); |
403 iCertificates.Append(p); |
403 TRAPD(err,iCertificates.AppendL(p)); |
404 idx = iCertificates.Count() - 1; |
404 if(err != KErrNone) |
|
405 { |
|
406 delete p; |
|
407 p = NULL; |
|
408 User::Leave( err ); |
|
409 } |
|
410 else |
|
411 { |
|
412 idx = iCertificates.Count() - 1; |
|
413 } |
405 } |
414 } |
406 else |
415 else |
407 { |
416 { |
408 RDEBUG_2( "CDeliveryComponentStorage::NewComponentL - TCertInfoPckg found at %d, deleting temporary", idx ); |
417 RDEBUG_2( "CDeliveryComponentStorage::NewComponentL - TCertInfoPckg found at %d, deleting temporary", idx ); |
409 delete p; |
418 delete p; |
421 } |
430 } |
422 } |
431 } |
423 newc->SetState(aState); |
432 newc->SetState(aState); |
424 newc->SetStatusNode(EIdle); |
433 newc->SetStatusNode(EIdle); |
425 UpdateL( *newc); |
434 UpdateL( *newc); |
426 iComponents.Append(newc); |
435 iComponents.AppendL(newc); |
427 iComponentIds.Append(newc->InternalId() ); |
436 iComponentIds.AppendL(newc->InternalId() ); |
428 RDEBUG_2( "CDeliveryComponentStorage::NewComponentL -Internal ID is %d, ", newc->InternalId() ); |
437 RDEBUG_2( "CDeliveryComponentStorage::NewComponentL -Internal ID is %d, ", newc->InternalId() ); |
429 PersistStateL(); |
438 PersistStateL(); |
430 CleanupStack::Pop(newc); |
439 CleanupStack::Pop(newc); |
431 return newc; |
440 return newc; |
432 } |
441 } |
499 { |
508 { |
500 TBuf8< NCentralRepositoryConstants::KMaxBinaryLength> buf; |
509 TBuf8< NCentralRepositoryConstants::KMaxBinaryLength> buf; |
501 TInt err(iRepository->Get(aInternalId, buf) ); |
510 TInt err(iRepository->Get(aInternalId, buf) ); |
502 User::LeaveIfError(err) ; |
511 User::LeaveIfError(err) ; |
503 resp = LoadComponentL(aInternalId, buf) ; |
512 resp = LoadComponentL(aInternalId, buf) ; |
504 iComponents.Append(resp); |
513 iComponents.AppendL(resp); |
505 } |
514 } |
506 if (resp == NULL) |
515 if (resp == NULL) |
507 { |
516 { |
508 User::Leave(KErrNotFound); |
517 User::Leave(KErrNotFound); |
509 } |
518 } |