}\r
for (opt = options; opt; opt = opt->next)\r
{\r
+ OIC_LOG_V(DEBUG, TAG, "[%s] opt will be added.", COAP_OPTION_DATA(*(coap_option * )opt->data));\r
coap_add_option(pdu, COAP_OPTION_KEY(*(coap_option * )opt->data),\r
COAP_OPTION_LENGTH(*(coap_option * )opt->data),\r
COAP_OPTION_DATA(*(coap_option * )opt->data));\r
COAP_OPT_LENGTH(option), (uint8_t *)buf, sizeof(buf),\r
encode))\r
{\r
+ OIC_LOG_V(DEBUG, TAG, "COAP URI element : %s", buf);\r
if (COAP_OPTION_URI_PATH == opt_iter.type || COAP_OPTION_URI_QUERY == opt_iter.type)\r
{\r
if (0 == isfirstsetflag)\r
{\r
isfirstsetflag = 1;\r
+ memcpy(optionResult + optionLength, "/", 1);\r
+ optionLength++;\r
memcpy(optionResult + optionLength, buf, strlen((const char *) buf));\r
optionLength += strlen((const char *) buf);\r
-\r
}\r
else\r
{\r
}\r
else\r
{\r
-\r
if (idx < count)\r
{\r
uint32_t length = (uint32_t) strlen((const char *) buf);\r