From 498bfa7aa85e35d2c8879f3fdda11ae3ce508c3c Mon Sep 17 00:00:00 2001 From: Marcin Kraglak Date: Tue, 12 Nov 2013 16:36:24 +0100 Subject: [PATCH] android: Clear adapter uuids during initialization Clear adapter uuids during init. We have to do it before other profiles will be able to register sdp records and add their uuids. --- android/adapter.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/android/adapter.c b/android/adapter.c index 5af525621..f3281ee30 100644 --- a/android/adapter.c +++ b/android/adapter.c @@ -1207,6 +1207,17 @@ static uint8_t set_discoverable_timeout(uint8_t *timeout) return HAL_STATUS_SUCCESS; } + +static void clear_uuids(void) +{ + struct mgmt_cp_remove_uuid cp; + + memset(&cp, 0, sizeof(cp)); + + mgmt_send(adapter->mgmt, MGMT_OP_REMOVE_UUID, adapter->index, + sizeof(cp), &cp, NULL, NULL, NULL); +} + static void read_info_complete(uint8_t status, uint16_t length, const void *param, void *user_data) { @@ -1247,6 +1258,8 @@ static void read_info_complete(uint8_t status, uint16_t length, const void *para /* TODO: Register all event notification handlers */ register_mgmt_handlers(); + clear_uuids(); + load_link_keys(NULL); set_io_capability(); -- 2.47.3