From 616ca1e792c1183dc74f4f2f5ad39ea8c3c156dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kamil=20Ch=C5=82odnicki?= Date: Tue, 24 Nov 2015 12:36:39 +0100 Subject: [PATCH] Fix rollback for StepRemoveEncryptionData MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Removing the encryption key is now done in clean(), so that it does not affect rollback. Change-Id: I629373fbaff6585e92581e48b97763cc6d374a28 Signed-off-by: Kamil Chłodnicki --- src/wgt/step/step_remove_encryption_data.cc | 2 +- src/wgt/step/step_remove_encryption_data.h | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/wgt/step/step_remove_encryption_data.cc b/src/wgt/step/step_remove_encryption_data.cc index e74a9ff..6281d42 100644 --- a/src/wgt/step/step_remove_encryption_data.cc +++ b/src/wgt/step/step_remove_encryption_data.cc @@ -12,7 +12,7 @@ namespace wgt { namespace encrypt { -common_installer::Step::Status StepRemoveEncryptionData::process() { +common_installer::Step::Status StepRemoveEncryptionData::clean() { wae_app_type_e enc_type = context_->request_mode.get() == common_installer::RequestMode::GLOBAL ? WAE_DOWNLOADED_GLOBAL_APP : WAE_DOWNLOADED_NORMAL_APP; diff --git a/src/wgt/step/step_remove_encryption_data.h b/src/wgt/step/step_remove_encryption_data.h index 1cd4458..63068ca 100644 --- a/src/wgt/step/step_remove_encryption_data.h +++ b/src/wgt/step/step_remove_encryption_data.h @@ -21,19 +21,19 @@ class StepRemoveEncryptionData : public common_installer::Step { using Step::Step; /** - * \brief Remove encryption keys from database + * \brief Empty method - the actual work is done in clean() to delay it * - * \return Status::ERROR in case of failure, - * Status::OK otherwise + * \return Status::OK */ - Status process() override; + Status process() override { return Status::OK; } /** - * \brief Empty method + * \brief Remove encryption keys from database * - * \return Status::OK + * \return Status::ERROR in case of failure, + * Status::OK otherwise */ - Status clean() override { return Status::OK; } + Status clean() override; /** * \brief Empty method -- 2.7.4