From 76fa071478386e8427ee217447baff4fda233784 Mon Sep 17 00:00:00 2001 From: Parkhi Date: Wed, 21 Sep 2016 13:27:50 +0900 Subject: [PATCH] Update a condition to do ownership transfer in easy setup In case that Only mediator's PDM db is deleted, ownership transfer SHOULD be terminated. Change-Id: I6513da5fb1bd56e7fb132da94fa6be40dbe2d7f6 Signed-off-by: Parkhi Reviewed-on: https://gerrit.iotivity.org/gerrit/12003 Reviewed-by: Jihun Ha Tested-by: jenkins-iotivity Reviewed-by: Madan Lanka --- service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp index 1db5dfb..7768e7c 100755 --- a/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp +++ b/service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp @@ -154,7 +154,16 @@ namespace OIC if (ownedDevice) { - res = ESResult::ES_OK; + if (isOwnedDeviceRegisteredInSVRDB()) + { + res = ESResult::ES_OK; + } + else + { + OIC_LOG(ERROR, ENROLEE_SECURITY_TAG, + "The found owned device is not in Mediator's PDM."); + res = ESResult::ES_ERROR; + } return res; } } -- 2.7.4