shared/att: Respond to any opcode that is not command
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.
diff --git a/src/shared/att.c b/src/shared/att.c
index 494b10d..ca2d051 100644
--- a/src/shared/att.c
+++ b/src/shared/att.c
@@ -149,7 +149,7 @@
}
if (opcode & ATT_OP_CMD_MASK)
- return ATT_OP_CMD_MASK;
+ return ATT_OP_TYPE_CMD;
return ATT_OP_TYPE_UNKNOWN;
}
@@ -841,10 +841,10 @@
}
/*
- * 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);