From 71e467fc875e757902b5eca06c777e8934ec6d75 Mon Sep 17 00:00:00 2001 From: Chul Lee Date: Thu, 27 Oct 2016 22:11:37 +0900 Subject: [PATCH] [IOT-1480] Remove the internal API from subownerclient sample. Change-Id: Ied92b38aa451d3ae0c9eb406b759b282f098204a Signed-off-by: Chul Lee Reviewed-on: https://gerrit.iotivity.org/gerrit/13785 Tested-by: jenkins-iotivity Reviewed-by: Randeep Singh --- .../security/provisioning/sample/subownerclient.c | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/resource/csdk/security/provisioning/sample/subownerclient.c b/resource/csdk/security/provisioning/sample/subownerclient.c index c5664a9..15e183a 100644 --- a/resource/csdk/security/provisioning/sample/subownerclient.c +++ b/resource/csdk/security/provisioning/sample/subownerclient.c @@ -557,14 +557,7 @@ static OicSecAcl_t* createAclForLEDAccess(const OicUuid_t* subject) goto CRACL_ERROR; } - //fill the eowner id as my deviceID. - OicUuid_t myUuid = {.id={0}}; - if(OC_STACK_OK != GetDoxmDeviceID(&myUuid)) - { - OIC_LOG(ERROR, TAG, "createAcl: GetDoxmDeviceID error return"); - goto CRACL_ERROR; - } - memcpy(ace->eownerID->id, myUuid.id, sizeof(myUuid.id)); + memcpy(ace->eownerID->id, subject->id, sizeof(subject->id)); return acl; @@ -616,22 +609,14 @@ static int provisionAclForLed() goto PVACL_ERROR; } - OicUuid_t subjectUuid; - OCStackResult rst = GetDoxmDeviceID(&subjectUuid); - if(OC_STACK_OK != rst) - { - OIC_LOG_V(ERROR, TAG, "GetDoxmDeviceID API error: %d", rst); - goto PVACL_ERROR; - } - - acl = createAclForLEDAccess(&subjectUuid); + acl = createAclForLEDAccess(&dev->doxm->subOwners->uuid); if(NULL == acl) { OIC_LOG(ERROR, TAG, "provisionAcl: Failed to create ACL for LED"); return -1; } - rst = OCProvisionACL((void*) g_ctx, dev, acl, provisionAclCB); + OCStackResult rst = OCProvisionACL((void*) g_ctx, dev, acl, provisionAclCB); if(OC_STACK_OK != rst) { OIC_LOG_V(ERROR, TAG, "OCProvisionACL API error: %d", rst); -- 2.7.4