fixed CoAP/TCP header type check logic from the size.
authorhyuna0213.jo <hyuna0213.jo@samsung.com>
Thu, 10 Dec 2015 00:51:10 +0000 (00:51 +0000)
committerJon A. Cruz <jonc@osg.samsung.com>
Mon, 11 Jan 2016 17:13:43 +0000 (17:13 +0000)
commit2a2c87398740af7962b839962532c005c5185c71
treebfcec158dc76ec90d56e366890a0591a6b57844f
parentc0165b4da73afb0dbad06b743c28d43daa605b9b
fixed CoAP/TCP header type check logic from the size.

The first nibble of coap over tcp message format is used
to indicate the length of the options/payload.
if the first nibble is 13, An 8-bit unsigned integer follows
the initial byte and indicates the length of options/payload minus 13.
(14: 16-bit unsigned integer,
     indicates the length of options/payload minus 269.
 15: 32-bit unsigned interger,
     indicates the length of options/payload minus 65805)

Change-Id: I2a88eb161584fb0104d2b533e3456c19a4b99304
Signed-off-by: hyuna0213.jo <hyuna0213.jo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4479
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jonc@osg.samsung.com>
resource/csdk/connectivity/lib/libcoap-4.1.1/pdu.c