fix to calculate the length of the remain data segment for BLE adapter.
authorjihwan.seo <jihwan.seo@samsung.com>
Wed, 26 Oct 2016 10:37:09 +0000 (19:37 +0900)
committerAshok Babu Channa <ashok.channa@samsung.com>
Thu, 27 Oct 2016 06:57:32 +0000 (06:57 +0000)
Change-Id: I12c7b639c3429ac1bf97f29d77265bbffb5fd1e3
Signed-off-by: jihwan.seo <jihwan.seo@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/13715
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Ashok Babu Channa <ashok.channa@samsung.com>
resource/csdk/connectivity/inc/cafragmentation.h

index 3dd8a9b..aa10eb0 100644 (file)
 /**
  * The length payload size of the normal data segment (after first segment) for ble fragmentation.
  */
-#define CA_BLE_NORMAL_SEGMENT_PAYLOAD_SIZE  CA_SUPPORTED_BLE_MTU_SIZE \
-    - CA_BLE_HEADER_SIZE
+#define CA_BLE_NORMAL_SEGMENT_PAYLOAD_SIZE ((CA_SUPPORTED_BLE_MTU_SIZE) \
+                                            - (CA_BLE_HEADER_SIZE))
 
 /**
  * The length payload size of the first data segment for ble fragmentation.
  */
-#define CA_BLE_FIRST_SEGMENT_PAYLOAD_SIZE CA_BLE_NORMAL_SEGMENT_PAYLOAD_SIZE \
-    - CA_BLE_LENGTH_HEADER_SIZE
+#define CA_BLE_FIRST_SEGMENT_PAYLOAD_SIZE ((CA_BLE_NORMAL_SEGMENT_PAYLOAD_SIZE) \
+                                           - (CA_BLE_LENGTH_HEADER_SIZE))
 
 /**
  * Current Header version.