Add a log message for better understanding in OT
authorJihun Ha <jihun.ha@samsung.com>
Wed, 25 Jan 2017 08:11:52 +0000 (17:11 +0900)
committerUze Choi <uzchoi@samsung.com>
Tue, 31 Jan 2017 06:31:51 +0000 (06:31 +0000)
Change-Id: I8409ae00196bcfd0ead8118cb21e38c51f8d4c07
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16759
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/easy-setup/mediator/richsdk/src/EnrolleeSecurity.cpp

index 66fab52..0034cef 100755 (executable)
@@ -92,6 +92,7 @@ namespace OIC
             {
                 m_mediatorID = {};
             }
+            OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "EnrolleeSecurity: Mediator ID %s", m_mediatorID.c_str());
         }
 
         void EnrolleeSecurity::onEnrolleeSecuritySafetyCB(OC::PMResultList_t *result,
@@ -213,6 +214,9 @@ namespace OIC
                 ownerID = {};
             }
 
+            OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Mediator ID %s", m_mediatorID.c_str());
+            OIC_LOG_V(DEBUG, ENROLEE_SECURITY_TAG, "Enrollee's Owner ID %s", ownerID.c_str());
+
             if(ownerID == m_mediatorID)
             {
                 OIC_LOG(INFO, ENROLEE_SECURITY_TAG,
@@ -572,7 +576,7 @@ namespace OIC
                     else
                     {
                         OIC_LOG(ERROR, ENROLEE_SECURITY_TAG,
-                            "The found device is already owned by Other Mediator.(FAILED)");
+                            "An ownership transfer knowledge is not synchronized between mediator and found enrollee.(FAILED)");
                         res = ESResult::ES_OWNERSHIP_IS_NOT_SYNCHRONIZED;
                         return res;
                     }
@@ -807,6 +811,8 @@ namespace OIC
 
         bool EnrolleeSecurity::isOwnedDeviceRegisteredInSVRDB()
         {
+            OIC_LOG(DEBUG, ENROLEE_SECURITY_TAG, "isOwnedDeviceRegisteredInSVRDB IN");
+
             OCStackResult res = OC_STACK_ERROR;
 
             OCUuidList_t *uuidList = NULL;