Commit 84e5f48d authored by hyuna0213.jo's avatar hyuna0213.jo Committed by Uze Choi

[JIRA IOT-768] fixed to parsing message length for TCP

when message length of TCP has short size (0~12 size)
Parser of Receiver is working as wrong size

Change-Id: I0bfee2be03cb22a7bbb53c4d0f419381c8306fb5
Signed-off-by: default avatarjihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/3403Reviewed-by: default avatarAshok Babu Channa <ashok.channa@samsung.com>
Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarPatrick Lankswert <patrick.lankswert@intel.com>
Signed-off-by: default avatarhyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4583Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent b517d1e7
......@@ -330,6 +330,9 @@ unsigned int coap_get_length_from_header(const unsigned char *header, coap_trans
unsigned int length_field_data = 0;
switch(transport)
{
case coap_tcp:
length = header[0] >> 4;
break;
case coap_tcp_8bit:
length = header[1] + COAP_TCP_LENGTH_FIELD_8_BIT;
break;
......
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