att_server: fix compile

This commit is contained in:
Milanka Ringwald 2021-12-13 15:13:19 +01:00
parent 38b893aaba
commit ed68ae9dc7
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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