Commit bbf0726c authored by Jihun Ha's avatar Jihun Ha Committed by Uze Choi

Change a maximum size of URI format property to 256 octets

As per OCF specification, a normal string-type property without
any statement for maximum length can have a 64 octets size at maximum.
However, for some cases, e.g. a string for URL, one can use longer string
value with a explicit statement of length in its resource model.
Fortunately, url format is already defined in OCF spec. as one of property type,
which can have 256 octets at maximum.

Change-Id: Ia8536ced5f4ab71ccdabd98e9936b00513efaa27
Signed-off-by: default avatarJihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17457Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarHeewon Park <h_w.park@samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent 33779087
......@@ -70,7 +70,7 @@ typedef struct
char accessToken[OIC_STRING_MAX_VALUE]; /**< Access token resolved with an auth code **/
OAUTH_TOKENTYPE accessTokenType; /**< Access token type **/
char authProvider[OIC_STRING_MAX_VALUE]; /**< Auth provider ID **/
char ciServer[OIC_STRING_MAX_VALUE]; /**< Cloud interface server URL which an Enrollee is going to registered **/
char ciServer[OIC_URI_STRING_MAX_VALUE]; /**< Cloud interface server URL which an Enrollee is going to registered **/
void *userdata; /**< Vender-specific data**/
} ESCoapCloudConfData;
......
......@@ -438,7 +438,7 @@ void updateCoapCloudConfResource(OCRepPayload* input)
memset(cloudData->accessToken, 0, OIC_STRING_MAX_VALUE);
g_ESCoapCloudConfResource.accessTokenType = NONE_OAUTH_TOKENTYPE;
memset(cloudData->authProvider, 0, OIC_STRING_MAX_VALUE);
memset(cloudData->ciServer, 0, OIC_STRING_MAX_VALUE);
memset(cloudData->ciServer, 0, OIC_URI_STRING_MAX_VALUE);
cloudData->userdata = NULL;
char *authCode = NULL;
......
......@@ -71,7 +71,7 @@ typedef struct
char accessToken[OIC_STRING_MAX_VALUE];
OAUTH_TOKENTYPE accessTokenType;
char authProvider[OIC_STRING_MAX_VALUE];
char ciServer[OIC_STRING_MAX_VALUE];
char ciServer[OIC_URI_STRING_MAX_VALUE];
} CoapCloudConfResource;
typedef struct
......
......@@ -34,12 +34,11 @@ extern "C"
#define OC_RSRVD_ES_INTERFACE "if"
#define OC_RSRVD_ES_RES_TYPE "rt"
#define OIC_STRING_MAX_VALUE 64
#define MAX_WEBLINKLEN 3
#define NUM_WIFIMODE 10
#define NUM_CONNECT_TYPE 3
#define OIC_STRING_MAX_VALUE 64
#define OIC_URI_STRING_MAX_VALUE 256
#define MAX_WEBLINKLEN 3
#define NUM_WIFIMODE 10
#define NUM_CONNECT_TYPE 3
/**
* Attributes used to form a proper easysetup conforming JSON message.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment