Currently when user stops the discovery, it always returns an error.
When the discovery is stopped by the timeout callback, there is no error.
This workaround consists of never returns any error.
Change-Id: I9c5fa539f56997ec4210666e13cced600b58575f
Signed-off-by: Corentin Lecouvey <corentin.lecouvey@open.eurogiciel.org>
case BLUETOOTH_EVENT_DISCOVERY_FINISHED:
BT_INFO("bt_adapter_device_discovery_state_changed_cb() will be called with BT_ADAPTER_DEVICE_DISCOVERY_FINISHED");
((bt_adapter_device_discovery_state_changed_cb)bt_event_slot_container[event_index].callback)
- (_bt_get_error_code(param->result), BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, NULL, bt_event_slot_container[event_index].user_data);
+ (BT_ERROR_NONE, BT_ADAPTER_DEVICE_DISCOVERY_FINISHED, NULL, bt_event_slot_container[event_index].user_data);
break;
case BLUETOOTH_EVENT_REMOTE_DEVICE_NAME_UPDATED:
BT_INFO("bt_adapter_device_discovery_state_changed_cb() will be called with BT_ADAPTER_DEVICE_DISCOVERY_FOUND");