RD Payload memory handling
authorHabib Virji <habib.virji@samsung.com>
Mon, 4 Jul 2016 16:04:26 +0000 (17:04 +0100)
committerHabib Virji <habib.virji@samsung.com>
Mon, 18 Jul 2016 09:14:42 +0000 (09:14 +0000)
commit05250eb740e5313c170a6f74b21c9621856bbf36
treef8895f01705c444c48f15f7bafd540a29fffd8a5
parentf10e37bba046abe4b111b2c429fc0889be46f1d3
RD Payload memory handling

By default 255 bytes of memory is allocated for the payload, when it need
extra amount of memory, cbor library provides a size member that keeps incrementing
but no memory is allocated or written.

In case of failure this value is passed to the ocpayloadconvert.c, which allocates
the right size and calls the conversion function again. It is necessary to allow the
code to get the right size.

Change-Id: I92202a91780fcf01d4ff8fea0a3c194ac5a42e83
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/9145
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/csdk/stack/include/rdpayload.h
resource/csdk/stack/src/rdpayload.c