From be0e4f04cb2d9e024474e6a0d68c36c638e8312d Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Sun, 27 Apr 2014 16:41:24 +0200 Subject: [PATCH] android/bluetooth: Rename get_adapter_discovering_type function Rename it to get_supported_discovery_type which better describes function purpose. --- android/bluetooth.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/android/bluetooth.c b/android/bluetooth.c index 7d678bae2..2bc79e205 100644 --- a/android/bluetooth.c +++ b/android/bluetooth.c @@ -1031,7 +1031,7 @@ static void clear_device_found(gpointer data, gpointer user_data) dev->found = false; } -static uint8_t get_adapter_discovering_type(void) +static uint8_t get_supported_discovery_type(void) { uint8_t type = SCAN_TYPE_NONE; @@ -1048,7 +1048,7 @@ static bool start_discovery(uint8_t type) { struct mgmt_cp_start_discovery cp; - cp.type = get_adapter_discovering_type() & type; + cp.type = get_supported_discovery_type() & type; DBG("type=0x%x", cp.type); @@ -1074,14 +1074,14 @@ static void check_discovery_state(uint8_t new_type, uint8_t old_type) DBG("%u %u", new_type, old_type); - if (new_type == get_adapter_discovering_type()) { + if (new_type == get_supported_discovery_type()) { g_slist_foreach(bonded_devices, clear_device_found, NULL); g_slist_foreach(cached_devices, clear_device_found, NULL); ev.state = HAL_DISCOVERY_STATE_STARTED; goto done; } - if (old_type != get_adapter_discovering_type()) + if (old_type != get_supported_discovery_type()) return; ev.state = HAL_DISCOVERY_STATE_STOPPED; @@ -2908,7 +2908,7 @@ static bool stop_discovery(uint8_t type) { struct mgmt_cp_stop_discovery cp; - cp.type = get_adapter_discovering_type() & type; + cp.type = get_supported_discovery_type() & type; DBG("type=0x%x", cp.type); @@ -3777,7 +3777,7 @@ static void handle_start_discovery_cmd(const void *buf, uint16_t len) break; case SCAN_TYPE_LE: - if (get_adapter_discovering_type() == SCAN_TYPE_LE) + if (get_supported_discovery_type() == SCAN_TYPE_LE) break; if (!stop_discovery(SCAN_TYPE_LE)) { @@ -3809,7 +3809,7 @@ static void handle_cancel_discovery_cmd(const void *buf, uint16_t len) case SCAN_TYPE_NONE: break; case SCAN_TYPE_LE: - if (get_adapter_discovering_type() != SCAN_TYPE_LE) + if (get_supported_discovery_type() != SCAN_TYPE_LE) break; if (gatt_device_found_cb) { -- 2.47.3