add temp code related to acl 18/87218/3
authoryoungman <yman.jung@samsung.com>
Wed, 7 Sep 2016 05:38:23 +0000 (14:38 +0900)
committerYoungjae Shin <yj99.shin@samsung.com>
Wed, 7 Sep 2016 05:56:42 +0000 (22:56 -0700)
Change-Id: I178584456a9182f259e1818b7a6534e6db664871
Signed-off-by: youngman <yman.jung@samsung.com>
src/ic-provisioning.c

index 9321480..fab9908 100644 (file)
@@ -518,6 +518,22 @@ static OicSecAcl_t* _provisioning_convert_acl(iotcon_provisioning_device_h devic
                resource->href = ic_utils_strdup(uri_path);
 
                // TODO: resource types & resource interfaces
+               // temp code
+               resource->types = calloc(1, sizeof(char*));
+               if (NULL == resource->types) {
+                       ERR("calloc() Fail(%d)", errno);
+                       return NULL;
+               }
+               resource->types[0] = strdup(" ");
+               resource->typeLen = 1;
+
+               resource->interfaces = calloc(1, sizeof(char*));
+               if (NULL == resource->interfaces) {
+                       ERR("calloc() Fail(%d)", errno);
+                       return NULL;
+               }
+               resource->interfaces[0] = strdup(OC_RSRVD_INTERFACE_DEFAULT);
+               resource->interfaceLen = 1;
 
                _provisioning_ace_add_resource(ace, resource);
        }