From f0fee838d4c76db04a2a3a6bf9f549a3f2d2fe5f Mon Sep 17 00:00:00 2001 From: Gowtham Anandha Babu Date: Thu, 26 Mar 2015 18:29:12 +0530 Subject: [PATCH] shared/gatt-client: Add const qualifier to prepare write value For all GATT write operation, value remains constant throughout the transaction. All bt_gatt_client_write procedure in src/shared/gatt-client.h follows this convention. --- src/shared/gatt-client.c | 2 +- src/shared/gatt-client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c index 729bd8789..056f81248 100644 --- a/src/shared/gatt-client.c +++ b/src/shared/gatt-client.c @@ -2703,7 +2703,7 @@ static struct request *get_reliable_request(struct bt_gatt_client *client, unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client, unsigned int id, uint16_t value_handle, - uint16_t offset, uint8_t *value, + uint16_t offset, const uint8_t *value, uint16_t length, bt_gatt_client_write_long_callback_t callback, void *user_data, diff --git a/src/shared/gatt-client.h b/src/shared/gatt-client.h index 8e5e0f5df..b816cc472 100644 --- a/src/shared/gatt-client.h +++ b/src/shared/gatt-client.h @@ -111,7 +111,7 @@ unsigned int bt_gatt_client_write_long_value(struct bt_gatt_client *client, unsigned int bt_gatt_client_prepare_write(struct bt_gatt_client *client, unsigned int id, uint16_t value_handle, uint16_t offset, - uint8_t *value, uint16_t length, + const uint8_t *value, uint16_t length, bt_gatt_client_write_long_callback_t callback, void *user_data, bt_gatt_client_destroy_func_t destroy); -- 2.47.3