X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fsrc%2Fcaprotocolmessage.c;h=a159931a009efac6ed8006e6b748ac088c308d11;hb=1cee1631595cac6a6394ac2e0b365c6dd5a42c68;hp=5ef5a879a2ce5f6e042927ded7f5d72ea8c5b0e7;hpb=390866079e285d2c74918432c0d597d5da52f8a0;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/src/caprotocolmessage.c b/resource/csdk/connectivity/src/caprotocolmessage.c index 5ef5a87..a159931 100644 --- a/resource/csdk/connectivity/src/caprotocolmessage.c +++ b/resource/csdk/connectivity/src/caprotocolmessage.c @@ -45,7 +45,6 @@ #define TAG "OIC_CA_PRTCL_MSG" -#define CA_BUFSIZE (128) #define CA_PDU_MIN_SIZE (4) #define CA_PORT_BUFFER_SIZE (4) @@ -446,7 +445,7 @@ CAResult_t CAParseUriPartial(const unsigned char *str, size_t length, int target } else if (str && length) { - unsigned char uriBuffer[CA_BUFSIZE] = { 0 }; + unsigned char uriBuffer[CA_MAX_URI_LENGTH] = { 0 }; unsigned char *pBuf = uriBuffer; size_t buflen = sizeof(uriBuffer); int res = (target == COAP_OPTION_URI_PATH) ? coap_split_path(str, length, pBuf, &buflen) : @@ -669,7 +668,10 @@ uint32_t CAGetOptionCount(coap_opt_iterator_t opt_iter) && COAP_OPTION_BLOCK1 != opt_iter.type && COAP_OPTION_BLOCK2 != opt_iter.type && COAP_OPTION_SIZE1 != opt_iter.type && COAP_OPTION_SIZE2 != opt_iter.type && COAP_OPTION_CONTENT_FORMAT != opt_iter.type - && COAP_OPTION_ACCEPT != opt_iter.type) + && COAP_OPTION_ACCEPT != opt_iter.type + && COAP_OPTION_URI_HOST != opt_iter.type && COAP_OPTION_URI_PORT != opt_iter.type + && COAP_OPTION_ETAG != opt_iter.type && COAP_OPTION_MAXAGE != opt_iter.type + && COAP_OPTION_PROXY_URI != opt_iter.type && COAP_OPTION_PROXY_SCHEME != opt_iter.type) { count++; } @@ -863,7 +865,17 @@ CAResult_t CAGetInfoFromPDU(const coap_pdu_t *pdu, const CAEndpoint_t *endpoint, outInfo->acceptFormat = CA_FORMAT_UNSUPPORTED; } OIC_LOG_V(DEBUG, TAG, "option[%d] has an unsupported format [%d]", - opt_iter.type, (uint8_t)buf[0]); + opt_iter.type, (uint8_t)buf[0]); + } + else if (COAP_OPTION_URI_PORT == opt_iter.type || + COAP_OPTION_URI_HOST == opt_iter.type || + COAP_OPTION_ETAG == opt_iter.type || + COAP_OPTION_MAXAGE == opt_iter.type || + COAP_OPTION_PROXY_URI == opt_iter.type || + COAP_OPTION_PROXY_SCHEME== opt_iter.type) + { + OIC_LOG_V(INFO, TAG, "option[%d] has an unsupported format [%d]", + opt_iter.type, (uint8_t)buf[0]); } else {