Enable arbitrary package sizes for OCPayloadConvert
authorErich Keane <erich.keane@intel.com>
Fri, 7 Aug 2015 17:18:51 +0000 (10:18 -0700)
committerErich Keane <erich.keane@intel.com>
Fri, 14 Aug 2015 16:45:41 +0000 (16:45 +0000)
commit7923ad1300da449981d8fd5f9a11ab4bd8cb8d2a
treed6742070e34a7d730f9f0e82787198ffd66c2983
parent48c221d147d027deafbf4c405b6eb4e424c9a13d
Enable arbitrary package sizes for OCPayloadConvert

Previously OCPayloadConvert would only allocate sizes up to 1024
due to how it was designed.  This patch will enable unlimited size,
since it will now recover from a CborErrorOutOfMemory and resize the
buffer, then try again.

This requires tinycbor commit 47a78569c0 (currently HEAD of master in
the github tinycbor library), so you'll likely need to do a git-pull in
the extlibs/tinycbor/tinycbor directory.  This commit also adds a
static_assert like functionality for C, and tests for the condition
where tinycbor needs updating.

Change-Id: I6f81d374ca2b68ebaf2f6a8239be58898b247309
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/2141
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
resource/c_common/platform_features.h
resource/csdk/stack/src/ocpayloadconvert.c