[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)
committerHabib Virji <habib.virji@samsung.com>
Fri, 25 Mar 2016 07:11:56 +0000 (07:11 +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>
resource/csdk/stack/src/ocpayloadconvert.c

index 663bc73..6514142 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");