diff --git a/src/ble/gatt_client.c b/src/ble/gatt_client.c index a05e07032..5378d4c1e 100644 --- a/src/ble/gatt_client.c +++ b/src/ble/gatt_client.c @@ -194,14 +194,14 @@ static gatt_client_t * gatt_client_provide_context_for_handle_and_start_timer(hc return gatt_client; } -static int is_ready(gatt_client_t * gatt_client){ +static bool is_ready(gatt_client_t * gatt_client){ return gatt_client->gatt_client_state == P_READY; } int gatt_client_is_ready(hci_con_handle_t con_handle){ gatt_client_t * gatt_client = gatt_client_provide_context_for_handle(con_handle); if (gatt_client == NULL) return 0; - return is_ready(gatt_client); + return is_ready(gatt_client) ? 1 : 0; } void gatt_client_mtu_enable_auto_negotiation(uint8_t enabled){ diff --git a/src/ble/gatt_client.h b/src/ble/gatt_client.h index e7d0b9ae7..00006e1c6 100644 --- a/src/ble/gatt_client.h +++ b/src/ble/gatt_client.h @@ -272,7 +272,7 @@ void gatt_client_mtu_enable_auto_negotiation(uint8_t enabled); void gatt_client_send_mtu_negotiation(btstack_packet_handler_t callback, hci_con_handle_t con_handle); /** - * @brief Returns if the GATT client is ready to receive a query. It is used with daemon. + * @brief Returns 1 if the GATT client is ready to receive a query. It is used with daemon. * @param con_handle * @return is_ready_status 0 - if no GATT client for con_handle is found, or is not ready, otherwise 1 */