Fix the prevent issues 43/162743/1 accepted/tizen/unified/20171207.070146 submit/tizen/20171206.015028
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 5 Dec 2017 06:44:43 +0000 (15:44 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 5 Dec 2017 06:48:31 +0000 (15:48 +0900)
Change-Id: I2931d3a845715c127ca096a14785ed8e37d33801
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
src/bluetooth-common.c

index 045bd9ab2678598f272657da5b49b5457b0ac7b1..25b4a73d2638daf124c884d45a3633f9e0f12083 100644 (file)
@@ -2194,11 +2194,11 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 #else
                bt_gatt_read_req_t *read_req = param->param_data;
                bt_gatt_server_read_value_requested_cb cb;
-               void *user_data = NULL;
+               void *user_data_read = NULL;
                bt_gatt_h gatt_handle = NULL;
 
                cb = __bt_gatt_attribute_get_read_cb(read_req->service_handle,
-                                               read_req->att_handle, &gatt_handle, &user_data);
+                                               read_req->att_handle, &gatt_handle, &user_data_read);
 
                BT_INFO("BLUETOOTH_EVENT_GATT_SERVER_READ_REQUESTED");
                if (cb == NULL) {
@@ -2210,7 +2210,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 
                cb(read_req->address, read_req->req_id, read_req->service_handle,
                                        gatt_handle, read_req->offset,
-                                       user_data);
+                                       user_data_read);
 #endif
                break;
        }
@@ -2270,10 +2270,10 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 #else
                bt_gatt_value_change_t *value_change = param->param_data;
                bt_gatt_server_write_value_requested_cb cb;
-               void *user_data = NULL;
+               void *user_data_write = NULL;
                bt_gatt_h gatt_handle = NULL;
                cb = __bt_gatt_attribute_get_value_change_cb(value_change->service_handle,
-                                               value_change->att_handle, &gatt_handle, &user_data);
+                                               value_change->att_handle, &gatt_handle, &user_data_write);
 
                BT_INFO("BLUETOOTH_EVENT_GATT_SERVER_VALUE_CHANGE");
                if (cb == NULL) {
@@ -2288,7 +2288,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 
                cb(value_change->address, value_change->req_id, value_change->service_handle,
                                        gatt_handle, (bool)value_change->response_needed, value_change->offset,
-                                       (char *)value_change->att_value, value_change->val_len, user_data);
+                                       (char *)value_change->att_value, value_change->val_len, user_data_write);
 #endif
                break;
        }
@@ -2313,17 +2313,17 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
 #else
                bt_gatt_char_notify_change_t *value_change = param->param_data;
                bt_gatt_server_characteristic_notification_state_changed_cb cb;
-               void *user_data = NULL;
+               void *user_data_cfm = NULL;
                bt_gatt_h gatt_handle = NULL;
                cb = __bt_gatt_attribute_get_notification_change_cb(value_change->service_handle,
-                                               value_change->att_handle, &gatt_handle, &user_data);
+                                               value_change->att_handle, &gatt_handle, &user_data_cfm);
 
                BT_INFO("BLUETOOTH_EVENT_GATT_SERVER_NOTIFICATION_STATE_CHANGED");
                if (cb == NULL)
                        return;
 
                cb(value_change->att_notify, value_change->service_handle,
-                               gatt_handle, user_data);
+                               gatt_handle, user_data_cfm);
 #endif
                break;
        }
@@ -2615,13 +2615,13 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        case BLUETOOTH_PBAP_CONNECTED:
        if (TIZEN_PROFILE_WEARABLE_IVI) {
                bt_pbap_connection_state_changed_cb cb = bt_event_slot_container[event_index].callback;
-               void *user_data = bt_event_slot_container[event_index].user_data;
+               void *user_data_pbap = bt_event_slot_container[event_index].user_data;
                bt_pbap_connected_t *connected = (bt_pbap_connected_t *)param->param_data;
 
                BT_INFO("BLUETOOTH_PBAP_CONNECTED");
 
                _bt_convert_address_to_string(&device_addr, &connected->btaddr);
-               cb(_bt_get_error_code(param->result), true, device_addr, user_data);
+               cb(_bt_get_error_code(param->result), true, device_addr, user_data_pbap);
 
                if (device_addr != NULL)
                        free(device_addr);
@@ -2633,13 +2633,13 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        case BLUETOOTH_PBAP_DISCONNECTED:
        if (TIZEN_PROFILE_WEARABLE_IVI) {
                bt_pbap_connection_state_changed_cb cb = bt_event_slot_container[event_index].callback;
-               void *user_data = bt_event_slot_container[event_index].user_data;
+               void *user_data_pbap = bt_event_slot_container[event_index].user_data;
                bt_pbap_connected_t *connected = (bt_pbap_connected_t *)param->param_data;
 
                BT_INFO("BLUETOOTH_PBAP_DISCONNECTED");
 
                _bt_convert_address_to_string(&device_addr, &connected->btaddr);
-               cb(_bt_get_error_code(param->result), false, device_addr, user_data);
+               cb(_bt_get_error_code(param->result), false, device_addr, user_data_pbap);
 
                if (device_addr != NULL)
                        free(device_addr);
@@ -2651,14 +2651,14 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        case BLUETOOTH_PBAP_PHONEBOOK_SIZE:
        if (TIZEN_PROFILE_WEARABLE_IVI) {
                bt_pbap_phone_book_size_cb cb = bt_event_slot_container[event_index].callback;
-               void *user_data = bt_event_slot_container[event_index].user_data;
+               void *user_data_pbap = bt_event_slot_container[event_index].user_data;
                bt_pbap_phonebook_size_t *pb_size = (bt_pbap_phonebook_size_t *)param->param_data;
 
                BT_INFO("BLUETOOTH_PBAP_PHONEBOOK_SIZE");
 
                _bt_unset_cb(BT_EVENT_PBAP_PHONEBOOK_SIZE);
                _bt_convert_address_to_string(&device_addr, &pb_size->btaddr);
-               cb(_bt_get_error_code(param->result), device_addr, pb_size->size, user_data);
+               cb(_bt_get_error_code(param->result), device_addr, pb_size->size, user_data_pbap);
 
                if (device_addr != NULL)
                        free(device_addr);
@@ -2670,7 +2670,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        case BLUETOOTH_PBAP_PHONEBOOK_PULL:
        if (TIZEN_PROFILE_WEARABLE_IVI) {
                bt_pbap_phone_book_received_cb cb = bt_event_slot_container[event_index].callback;
-               void *user_data = bt_event_slot_container[event_index].user_data;
+               void *user_data_pbap = bt_event_slot_container[event_index].user_data;
                bt_pbap_phonebook_pull_t *pb_pull = (bt_pbap_phonebook_pull_t *)(param->param_data);
 
                BT_INFO("BLUETOOTH_PBAP_PHONEBOOK_PULL");
@@ -2678,7 +2678,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                _bt_unset_cb(BT_EVENT_PBAP_PHONEBOOK_PULL);
                _bt_convert_address_to_string(&device_addr, &pb_pull->btaddr);
                cb(_bt_get_error_code(param->result), device_addr,
-                       (const char *)pb_pull->vcf_file, user_data);
+                       (const char *)pb_pull->vcf_file, user_data_pbap);
 
                if (device_addr != NULL)
                        free(device_addr);
@@ -2691,7 +2691,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        if (TIZEN_PROFILE_WEARABLE_IVI) {
                int i;
                bt_pbap_list_vcards_cb cb = bt_event_slot_container[event_index].callback;
-               void *user_data = bt_event_slot_container[event_index].user_data;
+               void *user_data_pbap = bt_event_slot_container[event_index].user_data;
                bt_pbap_vcard_list_t *vc_list = (bt_pbap_vcard_list_t *)(param->param_data);
                bt_pbap_vcard_info_s *vcard_info = NULL;
 
@@ -2707,7 +2707,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                _bt_convert_address_to_string(&device_addr, &vc_list->btaddr);
                cb(_bt_get_error_code(param->result), device_addr,
                        (const bt_pbap_vcard_info_s *)vcard_info, vc_list->length,
-                       user_data);
+                       user_data_pbap);
 
                if (device_addr != NULL)
                        free(device_addr);
@@ -2724,7 +2724,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
        case BLUETOOTH_PBAP_VCARD_PULL:
        if (TIZEN_PROFILE_WEARABLE_IVI) {
                bt_pbap_phone_book_received_cb cb = bt_event_slot_container[event_index].callback;
-               void *user_data = bt_event_slot_container[event_index].user_data;
+               void *user_data_pbap = bt_event_slot_container[event_index].user_data;
                bt_pbap_vcard_pull_t *vc_pull = (bt_pbap_vcard_pull_t *)(param->param_data);
 
                BT_INFO("BLUETOOTH_PBAP_VCARD_PULL");
@@ -2732,7 +2732,7 @@ static void __bt_event_proxy(int event, bluetooth_event_param_t *param, void *us
                _bt_unset_cb(BT_EVENT_PBAP_VCARD_PULL);
                _bt_convert_address_to_string(&device_addr, &vc_pull->btaddr);
                cb(_bt_get_error_code(param->result), device_addr,
-                       (const char *)vc_pull->vcf_file, user_data);
+                       (const char *)vc_pull->vcf_file, user_data_pbap);
 
                if (device_addr != NULL)
                        free(device_addr);