426 TPckg<TUid> repositoryUidPack( repositoryUid); |
426 TPckg<TUid> repositoryUidPack( repositoryUid); |
427 aMessage.ReadL(0, repositoryUidPack); |
427 aMessage.ReadL(0, repositoryUidPack); |
428 |
428 |
429 //add new CTrustedSession object into container and object index |
429 //add new CTrustedSession object into container and object index |
430 CRepositorySession * repositorySession = CRepositorySession::NewL( repositoryUid); |
430 CRepositorySession * repositorySession = CRepositorySession::NewL( repositoryUid); |
431 |
431 CleanupStack::PushL(repositorySession); |
|
432 |
432 iContainer->AddL( repositorySession); |
433 iContainer->AddL( repositorySession); |
433 TInt handle = iRepositorySessions->AddL( repositorySession); |
434 TInt handle = iRepositorySessions->AddL( repositorySession); |
434 |
435 |
435 //transmit handle to client |
436 //transmit handle to client |
436 TPckg<TInt> handlePckg(handle); |
437 TPckg<TInt> handlePckg(handle); |
437 TRAPD( r, aMessage.WriteL(3, handlePckg)) |
438 TRAPD( r, aMessage.WriteL(3, handlePckg)) |
438 |
439 CleanupStack::Pop( repositorySession ); //repositorySession |
|
440 |
439 if ( r != KErrNone) |
441 if ( r != KErrNone) |
440 { |
442 { |
441 iRepositorySessions->Remove(handle); |
443 iRepositorySessions->Remove(handle); |
442 PanicClient( aMessage, EBadDescriptor); |
444 PanicClient( aMessage, EBadDescriptor); |
443 return; |
445 return; |