Commit 8e60cf6d authored by Habib Virji's avatar Habib Virji

[IOT-993] Remove limit of payload size handling

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: default avatarHabib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/6305Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarMushfiqul Islam <i.mushfiq@samsung.com>
Tested-by: default avatarUze Choi <uzchoi@samsung.com>
parent 44eaee9a
......@@ -35,9 +35,6 @@
// 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
......@@ -95,7 +92,7 @@ OCStackResult OCConvertPayload(OCPayload* payload, uint8_t** outPayload, size_t*
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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment