equal
deleted
inserted
replaced
401 *iLockList ); |
401 *iLockList ); |
402 |
402 |
403 // TRAP InstallL - first time for if there has been schema update, and |
403 // TRAP InstallL - first time for if there has been schema update, and |
404 // the DB version is too old. Delete the DB and try to recreate it |
404 // the DB version is too old. Delete the DB and try to recreate it |
405 TRAPD( error, iMaintenance->InstallL( *iManipulate, *iSchema ) ); |
405 TRAPD( error, iMaintenance->InstallL( *iManipulate, *iSchema ) ); |
|
406 |
406 if( error == KErrCorrupt ) |
407 if( error == KErrCorrupt ) |
407 { |
408 { |
408 delete iSchema; |
409 delete iSchema; |
409 iSchema = NULL; // for CS |
410 iSchema = NULL; // for CS |
410 iSchema = CMdsSchema::NewL(); |
411 iSchema = CMdsSchema::NewL(); |
417 CMdSMaintenanceEngine::InitConnectionL(); |
418 CMdSMaintenanceEngine::InitConnectionL(); |
418 // TRAP InstallL - second time for if the schema file in private not updated |
419 // TRAP InstallL - second time for if the schema file in private not updated |
419 // during update, and the first attempt to recreate the DB fails. |
420 // during update, and the first attempt to recreate the DB fails. |
420 // Then schema file in rom is used for final attempt to recreate the DB |
421 // Then schema file in rom is used for final attempt to recreate the DB |
421 TRAP( error, iMaintenance->InstallL( *iManipulate, *iSchema ) ); |
422 TRAP( error, iMaintenance->InstallL( *iManipulate, *iSchema ) ); |
|
423 |
422 if( error == KErrCorrupt ) |
424 if( error == KErrCorrupt ) |
423 { |
425 { |
424 delete iSchema; |
426 delete iSchema; |
425 iSchema = NULL; // for CS |
427 iSchema = NULL; // for CS |
426 iSchema = CMdsSchema::NewL(); |
428 iSchema = CMdsSchema::NewL(); |
485 { |
487 { |
486 iShutdown = ETrue; |
488 iShutdown = ETrue; |
487 iClientThread.Close(); |
489 iClientThread.Close(); |
488 |
490 |
489 delete iBURWatcher; |
491 delete iBURWatcher; |
|
492 iBURWatcher = NULL; |
490 delete iDiskSpaceGarbageCollectorNotifier; |
493 delete iDiskSpaceGarbageCollectorNotifier; |
|
494 iDiskSpaceGarbageCollectorNotifier = NULL; |
491 delete iDiskFullNotifier; |
495 delete iDiskFullNotifier; |
|
496 iDiskFullNotifier = NULL; |
492 delete iManipulate; |
497 delete iManipulate; |
|
498 iManipulate = NULL; |
493 delete iSchema; |
499 delete iSchema; |
|
500 iSchema = NULL; |
494 delete iNotifier; |
501 delete iNotifier; |
|
502 iNotifier = NULL; |
495 delete iLockList; |
503 delete iLockList; |
|
504 iLockList = NULL; |
496 delete iMaintenance; |
505 delete iMaintenance; |
|
506 iMaintenance = NULL; |
497 delete iDefaultDBConnection; |
507 delete iDefaultDBConnection; |
|
508 iDefaultDBConnection = NULL; |
498 |
509 |
499 delete iHarvestingPrioritizationSerializationBuffer; |
510 delete iHarvestingPrioritizationSerializationBuffer; |
|
511 iHarvestingPrioritizationSerializationBuffer = NULL; |
500 iHarvestingPrioritizationChunk.Close(); |
512 iHarvestingPrioritizationChunk.Close(); |
501 |
513 |
502 delete iShutdownObserver; |
514 delete iShutdownObserver; |
|
515 iShutdownObserver = NULL; |
503 |
516 |
504 __LOGLB( ELogAlways, "Server stop" ); |
517 __LOGLB( ELogAlways, "Server stop" ); |
505 __DESTROY_LOGGER; |
518 __DESTROY_LOGGER; |
506 } |
519 } |
507 |
520 |
945 TInt result = KErrNoMemory; |
958 TInt result = KErrNoMemory; |
946 if (cleanup) |
959 if (cleanup) |
947 { |
960 { |
948 TRAP(result, CMdSServer::ThreadFunctionL()); |
961 TRAP(result, CMdSServer::ThreadFunctionL()); |
949 delete cleanup; |
962 delete cleanup; |
|
963 cleanup = NULL; |
950 } |
964 } |
951 __UHEAP_MARKEND; |
965 __UHEAP_MARKEND; |
952 return result; |
966 return result; |
953 } |
967 } |
954 |
968 |