Use device_address instead of bluetooth_hid_request_t 17/157517/2
authorDeokhyun Kim <dukan.kim@samsung.com>
Thu, 26 Oct 2017 10:30:14 +0000 (19:30 +0900)
committerDeokhyun Kim <dukan.kim@samsung.com>
Thu, 26 Oct 2017 10:30:32 +0000 (19:30 +0900)
Change-Id: Idc0fc244a66b6c2de088840d447c20fb293e80b7
Signed-off-by: Deokhyun Kim <dukan.kim@samsung.com>
src/bluetooth-common.c

index 4631f35d24369954a692c319e719a32172d4dbc8..045bd9ab2678598f272657da5b49b5457b0ac7b1 100644 (file)
@@ -1123,7 +1123,6 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        int *adv_handle;
        bluetooth_rfcomm_connection_t *connection_ind = NULL;
        bluetooth_rfcomm_disconnection_t *disconnection_ind = NULL;
-       bluetooth_hid_request_t *hid_connection_status = NULL;
        bt_socket_connection_s rfcomm_connection;
        bt_device_sdp_info_s *sdp_info = NULL;
        bt_device_connection_info_s *conn_info = NULL;
@@ -1987,9 +1986,8 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                break;
        case BLUETOOTH_HID_DEVICE_CONNECTED:
                BT_INFO("BLUETOOTH_HID_DEVICE_CONNECTED");
-               hid_connection_status = (bluetooth_hid_request_t *)(param->param_data);
-               _bt_convert_address_to_string(&device_addr,
-                                               &(hid_connection_status->device_addr));
+               bd_addr = (bluetooth_device_address_t *)(param->param_data);
+               _bt_convert_address_to_string(&device_addr, bd_addr);
                ((bt_hid_device_connection_state_changed_cb)bt_event_slot_container[event_index].callback)
                (_bt_get_error_code(param->result), TRUE, device_addr, bt_event_slot_container[event_index].user_data);
 
@@ -1997,9 +1995,8 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                break;
        case BLUETOOTH_HID_DEVICE_DISCONNECTED:
                BT_INFO("BLUETOOTH_HID_DEVICE_DISCONNECTED");
-               hid_connection_status = (bluetooth_hid_request_t *)(param->param_data);
-               _bt_convert_address_to_string(&device_addr,
-                                               &(hid_connection_status->device_addr));
+               bd_addr = (bluetooth_device_address_t *)(param->param_data);
+               _bt_convert_address_to_string(&device_addr, bd_addr);
                ((bt_hid_device_connection_state_changed_cb)bt_event_slot_container[event_index].callback)
                (_bt_get_error_code(param->result), FALSE, device_addr, bt_event_slot_container[event_index].user_data);