mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-21 13:21:05 +00:00
check ATT_PROPERTY_WRITE_WITHOUT_RESPONSE and ATT_PROPERTY_AUTHENTICATED_SIGNED_WRITE in resp write handlers
This commit is contained in:
parent
75aa0ba733
commit
fc47b5a5c5
@ -930,6 +930,7 @@ static void handle_write_command(att_connection_t * att_connection, uint8_t * re
|
||||
if (!ok) return;
|
||||
if ((it.flags & ATT_PROPERTY_DYNAMIC) == 0) return;
|
||||
if ((it.flags & ATT_PROPERTY_WRITE_WITHOUT_RESPONSE) == 0) return;
|
||||
if (att_validate_security(att_connection, &it)) return 0;
|
||||
(*att_write_callback)(handle, ATT_TRANSACTION_MODE_NONE, 0, request_buffer + 3, request_len - 3, NULL);
|
||||
}
|
||||
|
||||
@ -946,6 +947,8 @@ static void handle_signed_write_command(att_connection_t * att_connection, uint8
|
||||
int ok = att_find_handle(&it, handle);
|
||||
if (!ok) return;
|
||||
if ((it.flags & ATT_PROPERTY_DYNAMIC) == 0) return;
|
||||
if ((it.flags & ATT_PROPERTY_AUTHENTICATED_SIGNED_WRITE) == 0) return;
|
||||
if (att_validate_security(att_connection, &it)) return 0;
|
||||
(*att_write_callback)(handle, ATT_TRANSACTION_MODE_NONE, 0, request_buffer + 3, request_len - 3 - 12, (signature_t *) request_buffer + request_len - 12);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user