metadataengine/server/src/mdsmaintenanceengine.cpp
changeset 40 910a23996aa0
parent 31 81125601ee77
child 43 c5e73110f733
equal deleted inserted replaced
38:5210ffae7137 40:910a23996aa0
    77 // ------------------------------------------------
    77 // ------------------------------------------------
    78 //
    78 //
    79 CMdSMaintenanceEngine::~CMdSMaintenanceEngine()
    79 CMdSMaintenanceEngine::~CMdSMaintenanceEngine()
    80     {
    80     {
    81     delete iMaintenance;
    81     delete iMaintenance;
       
    82     iMaintenance = NULL;
    82     }
    83     }
    83 
    84 
    84 // ------------------------------------------------
    85 // ------------------------------------------------
    85 // InitConnectionL
    86 // InitConnectionL
    86 // ------------------------------------------------
    87 // ------------------------------------------------
   115 // ------------------------------------------------
   116 // ------------------------------------------------
   116 //
   117 //
   117 void CMdSMaintenanceEngine::InstallL( CMdSManipulationEngine& aManipulate, CMdsSchema& aSchema )
   118 void CMdSMaintenanceEngine::InstallL( CMdSManipulationEngine& aManipulate, CMdsSchema& aSchema )
   118     {
   119     {
   119     __LOG1( ELogAlways, "Trying to validate MDS DB, error expected if not created(first boot): %d", 0 );
   120     __LOG1( ELogAlways, "Trying to validate MDS DB, error expected if not created(first boot): %d", 0 );
   120     if ( !(iMaintenance->ValidateL( ) ) )
   121 	
       
   122     TBool isValid(EFalse);
       
   123     TRAPD(err, isValid = iMaintenance->ValidateL( ));
       
   124     
       
   125     if(err == KErrCorrupt)
       
   126         {
       
   127         DeleteDatabase();
       
   128         User::Leave( err );
       
   129         }
       
   130     
       
   131     else if ( !isValid )
   121         {
   132         {
   122         // Pump up priority to load the MDS DB up as fast as possible to
   133         // Pump up priority to load the MDS DB up as fast as possible to
   123         // enable client side session connections
   134         // enable client side session connections
   124         RProcess process;
   135         RProcess process;
   125         process.SetPriority( EPriorityForeground );
   136         process.SetPriority( EPriorityForeground );