[IOT-993] Remove limit of payload size handling
authorHabib Virji <habib.virji@samsung.com>
Thu, 24 Mar 2016 22:10:42 +0000 (22:10 +0000)
committerUze Choi <uzchoi@samsung.com>
Mon, 11 Apr 2016 11:07:41 +0000 (11:07 +0000)
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>
(cherry picked from commit 8e60cf6d33f5d9c4c0f308ea79784effda409109)
Reviewed-on: https://gerrit.iotivity.org/gerrit/7685
Reviewed-by: Uze Choi <uzchoi@samsung.com>
resource/csdk/stack/src/ocpayloadconvert.c

index 5c6b02f..49f31e7 100644 (file)
@@ -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");