MAX_URI_LENGTH was being redefined at multiple places
authorHabib Virji <habib.virji@samsung.com>
Tue, 30 Aug 2016 12:47:15 +0000 (13:47 +0100)
committerZiran Sun <ziran.sun@samsung.com>
Fri, 30 Sep 2016 13:44:29 +0000 (13:44 +0000)
MAX_URI_LENGTH was redefined at multiple places. It is defined in
ocstackconfig.h and should not be redefined at other places. Please
note this was only done in the sample code.

https://jira.iotivity.org/browse/IOT-1218

Change-Id: I334f028779f202a4371a1409d4e3ce69cd40d121
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/12291
Reviewed-by: Greg Zaverucha <gregz@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ziran Sun <ziran.sun@samsung.com>
resource/csdk/security/provisioning/ck_manager/sample/README.txt
resource/csdk/security/provisioning/ck_manager/sample/provisioningclient.c
resource/provisioning/examples/provisioningclient.cpp

index eb45a34..6378d5e 100644 (file)
@@ -44,7 +44,7 @@ ex) doorDeviceUUID00 (16 Numbers except to '-')
 Subject : doorDeviceUUID00
 Num. of Resource : 1
 -URI of resource
-ex) /a/light (Max_URI_Length: 64 Byte )
+ex) /a/light (Max_URI_Length: 256 Byte )
 [1]Resource : /a/light
 -Set the permission(C,R,U,D,N)
 ex) CRUDN, CRU_N,..(5 Charaters)
index bf040de..7784088 100644 (file)
@@ -35,7 +35,6 @@
 #include "ckm_info.h"
 #include "crlresource.h"
 
-#define MAX_URI_LENGTH (64)
 #define MAX_PERMISSION_LENGTH (5)
 #define MAX_ACE_LENGTH (100)
 #define MAX_INTERFACE_LENGTH (10)
@@ -213,7 +212,7 @@ static int InputACL(OicSecAcl_t *acl)
         return -1;
     }
     printf("-URI of resource\n");
-    printf("ex) /a/light (Max_URI_Length: 64 Byte )\n");
+    printf("ex) /a/light (Max_URI_Length: %d Byte )\n", MAX_URI_LENGTH);
 
     for(size_t i = 0; i < inputLen; i++)
     {
index 115b52b..ea492d8 100644 (file)
@@ -39,7 +39,6 @@
 #include "aclresource.h"
 #include "utlist.h"
 
-//#define MAX_URI_LENGTH (64)
 #define MAX_PERMISSION_LENGTH (5)
 #define ACL_RESRC_ARRAY_SIZE (3)
 #define CREATE (1)
@@ -402,7 +401,7 @@ static int InputACL(OicSecAcl_t *acl)
         return -1;
     }
     printf("-URI of resource\n");
-    printf("ex)/oic/sh/temp/0 (Max_URI_Length: 64 Byte )\n");
+    printf("ex)/oic/sh/temp/0 (Max_URI_Length: %d Byte )\n", MAX_URI_LENGTH);
     for(size_t i = 0; i < resourcesLen; i++)
     {
         OicSecRsrc_t* rsrc = (OicSecRsrc_t*)OICCalloc(1, sizeof(OicSecRsrc_t));
@@ -658,7 +657,7 @@ static OicSecPdAcl_t* InputPdACL()
         return NULL;
     }
     printf("-URI of resource\n");
-    printf("ex)/oic/sh/temp/0 (Max_URI_Length: 64 Byte )\n");
+    printf("ex)/oic/sh/temp/0 (Max_URI_Length: %d Byte )\n", MAX_URI_LENGTH);
     acl->resources = (char **)OICCalloc(acl->resourcesLen, sizeof(char *));
     if (NULL == acl->resources)
     {