[TBT][tizen_3.0_mobile][bluetooth][ACR-854][Add the response needed parameter] 03/102503/5
authorDoHyun Pyun <dh79.pyun@samsung.com>
Tue, 6 Dec 2016 04:38:29 +0000 (13:38 +0900)
committerjihun park <jihun87.park@samsung.com>
Fri, 9 Dec 2016 03:55:45 +0000 (12:55 +0900)
Change-Id: If8306d6c5cb380d70106f2289de14dca5c756b1e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
tbtcoreapp/src/view/tbt-bluetoothle-view.c

index 3a2ad837ad386edc83a561d329ff1a025c74798e..cbf3ee421b1b37edb5b8693c7a42574d3c669570 100644 (file)
@@ -155,7 +155,7 @@ static void _disconnect_button_pressed_cb(void *user_data, Evas_Object *obj, voi
 static void bluetooth_le_advertise(void* user_data);
 static void _bt_gatt_server_read_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, int offset, void *user_data);
 static void _bt_gatt_server_characteristic_notification_state_changed_cb(bool notify, bt_gatt_server_h server, bt_gatt_h gatt_handle, void *user_data);
-static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, int offset, const char *value, int len, void *user_data);
+static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, bool response_needed, int offset, const char *value, int len, void *user_data);
 static void _bt_adapter_le_advertising_state_changed_cb(int result, bt_advertiser_h advertiser, bt_adapter_le_advertising_state_e adv_state, void *user_data);
 static void services_list_show(bluetoothle_view *this);
 static void on_hardware_back_button_pressed(void *user_data, Evas_Object *obj, void *event_info);
@@ -1884,7 +1884,7 @@ static void _bt_gatt_server_characteristic_notification_state_changed_cb(bool no
        DBG("_bt_gatt_server_characteristic_notification_state_changed_cb");
 }
 
-static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, int offset, const char *value, int len, void *user_data)
+static void _bt_gatt_server_write_value_requested_cb(const char *remote_address, int request_id, bt_gatt_server_h server, bt_gatt_h gatt_handle, bool response_needed, int offset, const char *value, int len, void *user_data)
 {
        DBG("_bt_gatt_server_write_value_requested_cb");
        RETM_IF(NULL == user_data, "data is NULL");
@@ -1927,9 +1927,10 @@ static void _bt_gatt_server_write_value_requested_cb(const char *remote_address,
        elm_list_item_append(this->bluetoothle_list, str, NULL, NULL, NULL, NULL);
        SAFE_DELETE(str);
 
-       bt_gatt_server_send_response(request_id,
-                       BT_GATT_REQUEST_TYPE_WRITE, offset,
-               resp_status, NULL, 0);
+       if (response_needed == true)
+               bt_gatt_server_send_response(request_id,
+                               BT_GATT_REQUEST_TYPE_WRITE, offset,
+                       resp_status, NULL, 0);
 
        elm_list_go(this->bluetoothle_list);
 }