Error handling for the cbor handling in ocpayload
authorHabib Virji <habib.virji@samsung.com>
Fri, 13 Nov 2015 14:40:24 +0000 (14:40 +0000)
committerJon A. Cruz <jon@joncruz.org>
Sat, 5 Mar 2016 07:22:53 +0000 (07:22 +0000)
commitcb2a114cddf96ab32d6c854808fee8805c9fe6d1
tree573f277128a6e01f6307b022cf7f6dbcba2a9d93
parent4cd88f651cff105d4229096e26c318064d86a919
Error handling for the cbor handling in ocpayload

Defines a macro for error handling cbor load.
Any error leads to freeing and error details.
Some common functions has been created to ease
in freeing of memory in case of error.

OCDiscoveryCollectionPayloadAddResource is updated to
pass one parameter OCCollectionPayload instead of two
parameter. This is to ease passing param to MACRO.

Change-Id: I58e6c843fcacd8d952dad7b3a14c6327befcf77d
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/4237
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Jon A. Cruz <jon@joncruz.org>
extlibs/tinycbor/SConscript
resource/csdk/stack/include/ocpayload.h
resource/csdk/stack/include/rdpayload.h
resource/csdk/stack/src/ocpayload.c
resource/csdk/stack/src/ocpayloadconvert.c
resource/csdk/stack/src/ocpayloadparse.c
resource/csdk/stack/src/rdpayload.c
resource/unittests/OCRepresentationEncodingTest.cpp