* [PATCH BlueZ] shared/att: Respond to any opcode that is not command
@ 2017-04-28 18:24 Luiz Augusto von Dentz
0 siblings, 0 replies; only message in thread
From: Luiz Augusto von Dentz @ 2017-04-28 18:24 UTC (permalink / raw)
To: linux-bluetooth
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Although get_op_type does now check for the command mask it must
respond to anything other than ATT_OP_TYPE_CMD since there is no mask
for response opcode.
---
src/shared/att.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/shared/att.c b/src/shared/att.c
index 494b10d..2dc9d8b 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -841,10 +841,10 @@ static void handle_notify(struct bt_att *att, uint8_t opcode, uint8_t *pdu,
}
/*
- * If this was a request and no handler was registered for it, respond
- * with "Not Supported"
+ * If this was not a command and no handler was registered for it,
+ * respond with "Not Supported"
*/
- if (!found && get_op_type(opcode) == ATT_OP_TYPE_REQ)
+ if (!found && get_op_type(opcode) != ATT_OP_TYPE_CMD)
respond_not_supported(att, opcode);
bt_att_unref(att);
--
2.9.3
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-04-28 18:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 18:24 [PATCH BlueZ] shared/att: Respond to any opcode that is not command Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox