mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-31 00:32:52 +00:00
att_server: fix compile
This commit is contained in:
parent
38b893aaba
commit
ed68ae9dc7
@ -73,8 +73,8 @@ static void att_packet_handler(uint8_t packet_type, uint16_t handle, uint8_t *pa
|
||||
case ATT_DATA_PACKET:
|
||||
// parse opcode
|
||||
opcode = packet[0u];
|
||||
invalid = method > ATT_MULTIPLE_HANDLE_VALUE_NTF;
|
||||
method = opcode & 0x03fu;
|
||||
invalid = method > ATT_MULTIPLE_HANDLE_VALUE_NTF;
|
||||
// odd PDUs are sent from server to client - even PDUs are sent from client to server, also let server handle invalid ones
|
||||
for_server = ((method & 1u) == 0u) || invalid;
|
||||
index = for_server ? ATT_SERVER : ATT_CLIENT;
|
||||
|
@ -797,8 +797,8 @@ static void att_server_handle_att_pdu(hci_connection_t * hci_connection, uint8_t
|
||||
att_connection_t * att_connection = &hci_connection->att_connection;
|
||||
|
||||
uint8_t opcode = packet[0u];
|
||||
bool invalid = method > ATT_MULTIPLE_HANDLE_VALUE_NTF;
|
||||
uint8_t method = opcode & 0x03fu;
|
||||
bool invalid = method > ATT_MULTIPLE_HANDLE_VALUE_NTF;
|
||||
bool command = (opcode & 0x40u) != 0u;
|
||||
|
||||
// ignore invalid commands
|
||||
|
Loading…
x
Reference in New Issue
Block a user