From 1264fe399f210a1a72eb275ba4d2f5c3e684eea7 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald@gmail.com" Date: Thu, 30 Jan 2014 17:19:52 +0000 Subject: [PATCH] use correct request type in error response --- ble/att.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ble/att.c b/ble/att.c index d30fe3246..461f57aff 100644 --- a/ble/att.c +++ b/ble/att.c @@ -306,7 +306,7 @@ static uint16_t handle_find_information_request2(att_connection_t * att_connecti printf("ATT_FIND_INFORMATION_REQUEST: from %04X to %04X\n", start_handle, end_handle); if (start_handle > end_handle || start_handle == 0){ - return setup_error_invalid_handle(response_buffer, ATT_READ_BY_TYPE_REQUEST, start_handle); + return setup_error_invalid_handle(response_buffer, ATT_FIND_INFORMATION_REQUEST, start_handle); } uint16_t offset = 1; @@ -383,7 +383,7 @@ static uint16_t handle_find_by_type_value_request2(att_connection_t * att_connec hexdump2(attribute_value, attribute_len); if (start_handle > end_handle || start_handle == 0){ - return setup_error_invalid_handle(response_buffer, ATT_READ_BY_TYPE_REQUEST, start_handle); + return setup_error_invalid_handle(response_buffer, ATT_FIND_BY_TYPE_VALUE_RESPONSE, start_handle); } uint16_t offset = 1; @@ -593,7 +593,7 @@ static uint16_t handle_read_blob_request2(att_connection_t * att_connection, uin // check if handle can be read if ((it.flags & ATT_PROPERTY_READ) == 0) { - return setup_error_read_not_permitted(response_buffer, ATT_READ_REQUEST, handle); + return setup_error_read_not_permitted(response_buffer, ATT_READ_BLOB_REQUEST, handle); } // check security requirements