Returning less than MTU from CALEClientGetMtuSize 84/196284/1
authorHarish Kumara M <h.marappa@samsung.com>
Wed, 19 Dec 2018 15:40:00 +0000 (21:10 +0530)
committerAmit KS <amit.s12@samsung.com>
Thu, 27 Dec 2018 03:41:35 +0000 (09:11 +0530)
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/379
(cherry picked from commit fe33223fcec00b149a4a69ea8cdbae8656d83a8c)

Change-Id: I90044e8fd11d2f55ce02ccbb7bb8598df5072e30
Signed-off-by: Harish Kumara M <h.marappa@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
resource/csdk/connectivity/src/bt_le_adapter/tizen/caleclient_vd.c

index 4d752064fd83bc38188594bd1841dcf6993ecdd6..8bf7ebf0342764635aed8292aac645cce8a60c67 100644 (file)
@@ -1629,10 +1629,10 @@ 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, "Test: 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);
     return CA_DEFAULT_BLE_MTU_SIZE;
-
 }