Gatt connection state changed callback is set in the
network monitor (calenwmonitor.c) but is unset in the
gatt client (caleclient.c). Move this to network
monitor instead
https://github.sec.samsung.net/RS7-IOTIVITY/IoTivity/pull/278
(cherry picked from commit
961ff08710e7acd99277a335f7d9eeca2f68c16e)
Change-Id: I6e2cbc6c26ec23fc8cf308c44b6ae377b123fcb2
Signed-off-by: Veeraj Khokale <veeraj.sk@samsung.com>
Signed-off-by: Amit KS <amit.s12@samsung.com>
{
OIC_LOG(DEBUG, TAG, "IN");
- bt_gatt_unset_connection_state_changed_cb();
-
int numOfServersConnected = CAGetRegisteredServiceCount();
LEServerInfo *leServerInfo = NULL;
CAResult_t CAStopLEAdapter()
{
+ int ret = bt_gatt_unset_connection_state_changed_cb();
+ if (BT_ERROR_NONE != ret)
+ {
+ OIC_LOG(DEBUG, TAG, "bt_gatt_unset_connection_state_changed_cb failed");
+ return CA_STATUS_FAILED;
+ }
- int ret = bt_adapter_unset_state_changed_cb();
+ ret = bt_adapter_unset_state_changed_cb();
if (BT_ERROR_NONE != ret)
{
OIC_LOG(DEBUG, TAG, "bt_adapter_unset_state_changed_cb failed");