It cannot go beyond two level of increasing the payload size and it a[[ear it can go for handling bigger size.
Change-Id: I303f29563b32ba25d2f5e92a28f3a0ecac46ea60
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/6305
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Mushfiqul Islam <i.mushfiq@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
// Arbitrarily chosen size that seems to contain the majority of packages
#define INIT_SIZE (255)
-// This is six times of the init_size to handle MAX payload.
-#define MAX_SIZE (1530)
-
// Discovery Links Map Length.
#define LINKS_MAP_LEN 4
VERIFY_PARAM_NON_NULL(TAG, out2, "Failed to increase payload size");
out = out2;
err = OCConvertPayloadHelper(payload, out, &curSize);
- while (err == CborErrorOutOfMemory && curSize < MAX_SIZE)
+ while (err == CborErrorOutOfMemory)
{
uint8_t *out2 = (uint8_t *)OICRealloc(out, curSize);
VERIFY_PARAM_NON_NULL(TAG, out2, "Failed to increase payload size");