From 2f560e42703bc82b78c9a9f03787f31675be3927 Mon Sep 17 00:00:00 2001 From: Jakub Tyszkowski Date: Tue, 9 Dec 2014 09:51:46 +0100 Subject: [PATCH] shared/att: Handle commands under BT_ATT_ALL_REQUESTS This is needed for backward compatibility with gattrib. --- src/shared/att.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shared/att.c b/src/shared/att.c index ee425d8c4..3181b3664 100644 --- a/src/shared/att.c +++ b/src/shared/att.c @@ -666,8 +666,10 @@ struct notify_data { static bool opcode_match(uint8_t opcode, uint8_t test_opcode) { - if (opcode == BT_ATT_ALL_REQUESTS && - get_op_type(test_opcode) == ATT_OP_TYPE_REQ) + enum att_op_type op_type = get_op_type(test_opcode); + + if (opcode == BT_ATT_ALL_REQUESTS && (op_type == ATT_OP_TYPE_REQ || + op_type == ATT_OP_TYPE_CMD)) return true; return opcode == test_opcode; -- 2.47.3