Loading system/btif/include/btif_debug_conn.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ typedef enum { } btif_debug_conn_state_t; } btif_debug_conn_state_t; // Report a connection state change // Report a connection state change void btif_debug_conn_state(const RawAddress bda, void btif_debug_conn_state(const RawAddress& bda, const btif_debug_conn_state_t state, const btif_debug_conn_state_t state, const tGATT_DISCONN_REASON disconnect_reason); const tGATT_DISCONN_REASON disconnect_reason); Loading system/btif/src/btif_core.cc +2 −2 Original line number Original line Diff line number Diff line Loading @@ -890,7 +890,7 @@ bt_status_t btif_get_adapter_property(bt_property_type_t type) { (type != BT_PROPERTY_BDNAME)) (type != BT_PROPERTY_BDNAME)) return BT_STATUS_NOT_READY; return BT_STATUS_NOT_READY; memset(&(req.read_req.bd_addr), 0, sizeof(RawAddress)); req.read_req.bd_addr = RawAddress::kEmpty; req.read_req.type = type; req.read_req.type = type; return btif_transfer_context(execute_storage_request, return btif_transfer_context(execute_storage_request, Loading Loading @@ -1063,7 +1063,7 @@ bt_status_t btif_set_remote_device_property(RawAddress* remote_addr, if (!btif_is_enabled()) return BT_STATUS_NOT_READY; if (!btif_is_enabled()) return BT_STATUS_NOT_READY; memcpy(&(req.write_req.bd_addr), remote_addr, sizeof(RawAddress)); req.write_req.bd_addr = *remote_addr; memcpy(&(req.write_req.prop), property, sizeof(bt_property_t)); memcpy(&(req.write_req.prop), property, sizeof(bt_property_t)); return btif_transfer_context(execute_storage_remote_request, return btif_transfer_context(execute_storage_remote_request, Loading system/btif/src/btif_debug_conn.cc +2 −2 Original line number Original line Diff line number Diff line Loading @@ -63,7 +63,7 @@ static void next_event() { if (current_event == NUM_CONNECTION_EVENTS) current_event = 0; if (current_event == NUM_CONNECTION_EVENTS) current_event = 0; } } void btif_debug_conn_state(const RawAddress bda, void btif_debug_conn_state(const RawAddress& bda, const btif_debug_conn_state_t state, const btif_debug_conn_state_t state, const tGATT_DISCONN_REASON disconnect_reason) { const tGATT_DISCONN_REASON disconnect_reason) { next_event(); next_event(); Loading @@ -72,7 +72,7 @@ void btif_debug_conn_state(const RawAddress bda, evt->ts = time_gettimeofday_us(); evt->ts = time_gettimeofday_us(); evt->state = state; evt->state = state; evt->disconnect_reason = disconnect_reason; evt->disconnect_reason = disconnect_reason; memcpy(&evt->bda, &bda, sizeof(RawAddress)); evt->bda = bda; } } void btif_debug_conn_dump(int fd) { void btif_debug_conn_dump(int fd) { Loading system/btif/src/btif_hf_client.cc +0 −1 Original line number Original line Diff line number Diff line Loading @@ -249,7 +249,6 @@ btif_hf_client_cb_t* btif_hf_client_allocate_cb() { return NULL; return NULL; } } /***************************************************************************** /***************************************************************************** * * * btif hf api functions (no context switch) * btif hf api functions (no context switch) Loading system/btif/src/btif_storage.cc +7 −9 Original line number Original line Diff line number Diff line Loading @@ -456,8 +456,7 @@ static bt_status_t btif_in_fetch_bonded_devices( } } } } bt_linkkey_file_found = true; bt_linkkey_file_found = true; memcpy(&p_bonded_devices->devices[p_bonded_devices->num_devices++], p_bonded_devices->devices[p_bonded_devices->num_devices++] = bd_addr; &bd_addr, sizeof(RawAddress)); } else { } else { bt_linkkey_file_found = false; bt_linkkey_file_found = false; } } Loading Loading @@ -557,13 +556,13 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t* property) { LOG_ERROR(LOG_TAG, LOG_ERROR(LOG_TAG, "%s: Controller not ready! Unable to return Bluetooth Address", "%s: Controller not ready! Unable to return Bluetooth Address", __func__); __func__); memset(bd_addr, 0, sizeof(RawAddress)); *bd_addr = RawAddress::kEmpty; return BT_STATUS_FAIL; return BT_STATUS_FAIL; } else { } else { LOG_ERROR(LOG_TAG, "%s: Controller ready!", __func__); LOG_ERROR(LOG_TAG, "%s: Controller ready!", __func__); memcpy(bd_addr, controller->get_address(), sizeof(RawAddress)); *bd_addr = *controller->get_address(); } } property->len = sizeof(RawAddress); property->len = RawAddress::kLength; return BT_STATUS_SUCCESS; return BT_STATUS_SUCCESS; } else if (property->type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) { } else if (property->type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) { btif_bonded_devices_t bonded_devices; btif_bonded_devices_t bonded_devices; Loading @@ -576,7 +575,7 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t* property) { __func__, bonded_devices.num_devices); __func__, bonded_devices.num_devices); if (bonded_devices.num_devices > 0) { if (bonded_devices.num_devices > 0) { property->len = bonded_devices.num_devices * sizeof(RawAddress); property->len = bonded_devices.num_devices * RawAddress::kLength; memcpy(property->val, bonded_devices.devices, property->len); memcpy(property->val, bonded_devices.devices, property->len); } } Loading Loading @@ -852,7 +851,7 @@ bt_status_t btif_storage_load_bonded_devices(void) { bonded_devices.num_devices * sizeof(RawAddress); bonded_devices.num_devices * sizeof(RawAddress); adapter_props[num_props].val = devices_list; adapter_props[num_props].val = devices_list; for (i = 0; i < bonded_devices.num_devices; i++) { for (i = 0; i < bonded_devices.num_devices; i++) { memcpy(devices_list + i, &bonded_devices.devices[i], sizeof(RawAddress)); devices_list[i] = bonded_devices.devices[i]; } } num_props++; num_props++; Loading Loading @@ -1166,8 +1165,7 @@ static bt_status_t btif_in_fetch_bonded_ble_device( // Fill in the bonded devices // Fill in the bonded devices if (device_added) { if (device_added) { memcpy(&p_bonded_devices->devices[p_bonded_devices->num_devices++], p_bonded_devices->devices[p_bonded_devices->num_devices++] = bd_addr; &bd_addr, sizeof(RawAddress)); btif_gatts_add_bonded_dev_from_nv(bd_addr); btif_gatts_add_bonded_dev_from_nv(bd_addr); } } Loading Loading
system/btif/include/btif_debug_conn.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -28,7 +28,7 @@ typedef enum { } btif_debug_conn_state_t; } btif_debug_conn_state_t; // Report a connection state change // Report a connection state change void btif_debug_conn_state(const RawAddress bda, void btif_debug_conn_state(const RawAddress& bda, const btif_debug_conn_state_t state, const btif_debug_conn_state_t state, const tGATT_DISCONN_REASON disconnect_reason); const tGATT_DISCONN_REASON disconnect_reason); Loading
system/btif/src/btif_core.cc +2 −2 Original line number Original line Diff line number Diff line Loading @@ -890,7 +890,7 @@ bt_status_t btif_get_adapter_property(bt_property_type_t type) { (type != BT_PROPERTY_BDNAME)) (type != BT_PROPERTY_BDNAME)) return BT_STATUS_NOT_READY; return BT_STATUS_NOT_READY; memset(&(req.read_req.bd_addr), 0, sizeof(RawAddress)); req.read_req.bd_addr = RawAddress::kEmpty; req.read_req.type = type; req.read_req.type = type; return btif_transfer_context(execute_storage_request, return btif_transfer_context(execute_storage_request, Loading Loading @@ -1063,7 +1063,7 @@ bt_status_t btif_set_remote_device_property(RawAddress* remote_addr, if (!btif_is_enabled()) return BT_STATUS_NOT_READY; if (!btif_is_enabled()) return BT_STATUS_NOT_READY; memcpy(&(req.write_req.bd_addr), remote_addr, sizeof(RawAddress)); req.write_req.bd_addr = *remote_addr; memcpy(&(req.write_req.prop), property, sizeof(bt_property_t)); memcpy(&(req.write_req.prop), property, sizeof(bt_property_t)); return btif_transfer_context(execute_storage_remote_request, return btif_transfer_context(execute_storage_remote_request, Loading
system/btif/src/btif_debug_conn.cc +2 −2 Original line number Original line Diff line number Diff line Loading @@ -63,7 +63,7 @@ static void next_event() { if (current_event == NUM_CONNECTION_EVENTS) current_event = 0; if (current_event == NUM_CONNECTION_EVENTS) current_event = 0; } } void btif_debug_conn_state(const RawAddress bda, void btif_debug_conn_state(const RawAddress& bda, const btif_debug_conn_state_t state, const btif_debug_conn_state_t state, const tGATT_DISCONN_REASON disconnect_reason) { const tGATT_DISCONN_REASON disconnect_reason) { next_event(); next_event(); Loading @@ -72,7 +72,7 @@ void btif_debug_conn_state(const RawAddress bda, evt->ts = time_gettimeofday_us(); evt->ts = time_gettimeofday_us(); evt->state = state; evt->state = state; evt->disconnect_reason = disconnect_reason; evt->disconnect_reason = disconnect_reason; memcpy(&evt->bda, &bda, sizeof(RawAddress)); evt->bda = bda; } } void btif_debug_conn_dump(int fd) { void btif_debug_conn_dump(int fd) { Loading
system/btif/src/btif_hf_client.cc +0 −1 Original line number Original line Diff line number Diff line Loading @@ -249,7 +249,6 @@ btif_hf_client_cb_t* btif_hf_client_allocate_cb() { return NULL; return NULL; } } /***************************************************************************** /***************************************************************************** * * * btif hf api functions (no context switch) * btif hf api functions (no context switch) Loading
system/btif/src/btif_storage.cc +7 −9 Original line number Original line Diff line number Diff line Loading @@ -456,8 +456,7 @@ static bt_status_t btif_in_fetch_bonded_devices( } } } } bt_linkkey_file_found = true; bt_linkkey_file_found = true; memcpy(&p_bonded_devices->devices[p_bonded_devices->num_devices++], p_bonded_devices->devices[p_bonded_devices->num_devices++] = bd_addr; &bd_addr, sizeof(RawAddress)); } else { } else { bt_linkkey_file_found = false; bt_linkkey_file_found = false; } } Loading Loading @@ -557,13 +556,13 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t* property) { LOG_ERROR(LOG_TAG, LOG_ERROR(LOG_TAG, "%s: Controller not ready! Unable to return Bluetooth Address", "%s: Controller not ready! Unable to return Bluetooth Address", __func__); __func__); memset(bd_addr, 0, sizeof(RawAddress)); *bd_addr = RawAddress::kEmpty; return BT_STATUS_FAIL; return BT_STATUS_FAIL; } else { } else { LOG_ERROR(LOG_TAG, "%s: Controller ready!", __func__); LOG_ERROR(LOG_TAG, "%s: Controller ready!", __func__); memcpy(bd_addr, controller->get_address(), sizeof(RawAddress)); *bd_addr = *controller->get_address(); } } property->len = sizeof(RawAddress); property->len = RawAddress::kLength; return BT_STATUS_SUCCESS; return BT_STATUS_SUCCESS; } else if (property->type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) { } else if (property->type == BT_PROPERTY_ADAPTER_BONDED_DEVICES) { btif_bonded_devices_t bonded_devices; btif_bonded_devices_t bonded_devices; Loading @@ -576,7 +575,7 @@ bt_status_t btif_storage_get_adapter_property(bt_property_t* property) { __func__, bonded_devices.num_devices); __func__, bonded_devices.num_devices); if (bonded_devices.num_devices > 0) { if (bonded_devices.num_devices > 0) { property->len = bonded_devices.num_devices * sizeof(RawAddress); property->len = bonded_devices.num_devices * RawAddress::kLength; memcpy(property->val, bonded_devices.devices, property->len); memcpy(property->val, bonded_devices.devices, property->len); } } Loading Loading @@ -852,7 +851,7 @@ bt_status_t btif_storage_load_bonded_devices(void) { bonded_devices.num_devices * sizeof(RawAddress); bonded_devices.num_devices * sizeof(RawAddress); adapter_props[num_props].val = devices_list; adapter_props[num_props].val = devices_list; for (i = 0; i < bonded_devices.num_devices; i++) { for (i = 0; i < bonded_devices.num_devices; i++) { memcpy(devices_list + i, &bonded_devices.devices[i], sizeof(RawAddress)); devices_list[i] = bonded_devices.devices[i]; } } num_props++; num_props++; Loading Loading @@ -1166,8 +1165,7 @@ static bt_status_t btif_in_fetch_bonded_ble_device( // Fill in the bonded devices // Fill in the bonded devices if (device_added) { if (device_added) { memcpy(&p_bonded_devices->devices[p_bonded_devices->num_devices++], p_bonded_devices->devices[p_bonded_devices->num_devices++] = bd_addr; &bd_addr, sizeof(RawAddress)); btif_gatts_add_bonded_dev_from_nv(bd_addr); btif_gatts_add_bonded_dev_from_nv(bd_addr); } } Loading