Returning less than MTU from CALEClientGetMtuSize 54/201654/1
authorkush agrawal <kush.agrawal@samsung.com>
Wed, 6 Mar 2019 13:09:08 +0000 (18:39 +0530)
committerAbhishek Sansanwal <abhishek.s94@samsung.com>
Mon, 18 Mar 2019 09:43:54 +0000 (05:43 -0400)
We are not able to send data of MTU size over BLE in TV
due to there is a bug in TV's BT framework. There is need of
this change untill the bug gets fixed in BT framework.

NOTE: Revert this patch once the fix is fixed in BT framework.

https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/442
(cherry picked from 0e9a64055414364fb3c92a513692b78b67844d4e)

Change-Id: I4390c7083493e2f9b76d30d8b7d3d1b66b5a4c5e
Signed-off-by: kush agrawal <kush.agrawal@samsung.com>
Signed-off-by: Abhishek Sansanwal <abhishek.s94@samsung.com>
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient.c

index 91bfa18..b89616e 100644 (file)
@@ -1588,7 +1588,8 @@ uint16_t CALEClientGetMtuSize(const char* remote_address)
         if (serverInfo->status == LE_STATUS_SERVICES_DISCOVERED){
             OIC_LOG_V(DEBUG, TAG, "Mtu Size [%d]", serverInfo->mtu_size);
             oc_mutex_unlock(g_LEServerListMutex);
-            return serverInfo->mtu_size;
+            OIC_LOG_V(INFO, TAG, "Returning Mtu Size [%d]", serverInfo->mtu_size - CA_BLE_MTU_HEADER_SIZE);
+            return serverInfo->mtu_size - CA_BLE_MTU_HEADER_SIZE;
         }
     }
     oc_mutex_unlock(g_LEServerListMutex);