From a70d2eda66fd2a3683e1b470a7d9c56c00831a8e Mon Sep 17 00:00:00 2001 From: Kush Date: Thu, 19 Sep 2019 14:09:01 +0530 Subject: [PATCH] Fix for destroying gatt client in case of error. Client Handle was not destroyed. Because of that from second time onwards client handle was not getting created. MTU size was set to default and bt buffer overflow error was coming. https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/578/commits/e51cc0061628ab0fb7710ed3a5c3df08b61e2d5a (cherry-picked from e51cc0061628ab0fb7710ed3a5c3df08b61e2d5a) Change-Id: I65e5092c8b9c230b4394dd6239706b5f2d28fd36 Signed-off-by: Kush Signed-off-by: himanshu --- resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_vd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_vd.c b/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_vd.c index f06d8c6..68ad1f5 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_vd.c +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/caleserver_vd.c @@ -1082,6 +1082,7 @@ uint16_t CALEServerGetMtuSize(const char* address) { OIC_LOG_V(ERROR, TAG, "bt_gatt_client_get_att_mtu failed with return [%s]", CALEGetErrorMsg(ret)); + bt_gatt_client_destroy(client); oc_mutex_unlock(g_LEClientListMutex); return CA_DEFAULT_BLE_MTU_SIZE; } -- 2.7.4