This patch fixes characteristic property for those characteristics which contains extended characteristic properties descriptor. --- unit/test-gatt.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/unit/test-gatt.c b/unit/test-gatt.c index 0912348..126a59f 100644 --- a/unit/test-gatt.c +++ b/unit/test-gatt.c @@ -257,7 +257,7 @@ struct context { raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00, \ 0x2a), \ raw_pdu(0x08, 0x13, 0xf0, 0x18, 0xf0, 0x03, 0x28), \ - raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x02, 0x15, 0xf0, 0xef, \ + raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x82, 0x15, 0xf0, 0xef, \ 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, \ 0x00, 0x00, 0x00, 0x09, 0xB0, 0x00, 0x00), \ raw_pdu(0x08, 0x15, 0xf0, 0x18, 0xf0, 0x03, 0x28), \ @@ -268,7 +268,7 @@ struct context { raw_pdu(0x04, 0x16, 0xf0, 0x16, 0xf0), \ raw_pdu(0x05, 0x01, 0x16, 0xf0, 0x00, 0x29), \ raw_pdu(0x08, 0x01, 0x00, 0x10, 0x00, 0x03, 0x28), \ - raw_pdu(0x09, 0x07, 0x02, 0x00, 0x32, 0x03, 0x00, 0x29, \ + raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29, \ 0x2a), \ raw_pdu(0x08, 0x03, 0x00, 0x10, 0x00, 0x03, 0x28), \ raw_pdu(0x01, 0x08, 0x03, 0x00, 0x0a) @@ -1556,7 +1556,8 @@ static struct gatt_db *make_test_spec_small_db(void) BT_ATT_PERM_WRITE, BT_GATT_CHRC_PROP_READ | BT_GATT_CHRC_PROP_NOTIFY | - BT_GATT_CHRC_PROP_INDICATE, + BT_GATT_CHRC_PROP_INDICATE | + BT_GATT_CHRC_PROP_EXT_PROP, "BlueZ"), DESCRIPTOR(GATT_CLIENT_CHARAC_CFG_UUID, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x00, 0x00), @@ -1572,7 +1573,8 @@ static struct gatt_db *make_test_spec_small_db(void) "BlueZ Unit Tester"), CHARACTERISTIC(0000B009-0000-0000-0123-456789abcdef, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, - BT_GATT_CHRC_PROP_READ, 0x09), + BT_GATT_CHRC_PROP_READ | + BT_GATT_CHRC_PROP_EXT_PROP, 0x09), DESCRIPTOR(GATT_CHARAC_EXT_PROPER_UUID, BT_ATT_PERM_READ, 0x01, 0x00), CHARACTERISTIC(GATT_CHARAC_APPEARANCE, BT_ATT_PERM_READ, @@ -1617,7 +1619,8 @@ static struct gatt_db *make_test_spec_large_db_1(void) PRIMARY_SERVICE(0x0080, "a00b", 7), CHARACTERISTIC(0xb008, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, BT_GATT_CHRC_PROP_READ | - BT_GATT_CHRC_PROP_WRITE, + BT_GATT_CHRC_PROP_WRITE | + BT_GATT_CHRC_PROP_EXT_PROP, 0x08), DESCRIPTOR(0xb015, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x01), DESCRIPTOR(0xb016, BT_ATT_PERM_READ | BT_ATT_PERM_WRITE, 0x02), @@ -2546,7 +2549,7 @@ int main(int argc, char *argv[]) raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00, 0x2a), raw_pdu(0x08, 0x13, 0xf0, 0x18, 0xf0, 0x03, 0x28), - raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x02, 0x15, 0xf0, 0xef, + raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x82, 0x15, 0xf0, 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09, 0xb0, 0x00, 0x00), @@ -2560,7 +2563,7 @@ int main(int argc, char *argv[]) ts_small_db, NULL, raw_pdu(0x03, 0x00, 0x02), raw_pdu(0x08, 0x01, 0x00, 0x0f, 0x00, 0x03, 0x28), - raw_pdu(0x09, 0x07, 0x02, 0x00, 0x32, 0x03, 0x00, 0x29, + raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29, 0x2a), raw_pdu(0x08, 0x03, 0x00, 0x0f, 0x00, 0x03, 0x28), raw_pdu(0x01, 0x08, 0x03, 0x00, 0x0a)); @@ -2599,7 +2602,7 @@ int main(int argc, char *argv[]) raw_pdu(0x09, 0x07, 0x12, 0xf0, 0x02, 0x13, 0xf0, 0x00, 0x2a), raw_pdu(0x08, 0x13, 0xf0, 0x17, 0xf0, 0x03, 0x28), - raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x02, 0x15, 0xf0, 0xef, + raw_pdu(0x09, 0x15, 0x14, 0xf0, 0x82, 0x15, 0xf0, 0xef, 0xcd, 0xab, 0x89, 0x67, 0x45, 0x23, 0x01, 0x00, 0x00, 0x00, 0x00, 0x09, 0xb0, 0x00, 0x00), @@ -2613,7 +2616,7 @@ int main(int argc, char *argv[]) ts_small_db, NULL, raw_pdu(0x03, 0x00, 0x02), raw_pdu(0x08, 0x01, 0x00, 0x0f, 0x00, 0x03, 0x28), - raw_pdu(0x09, 0x07, 0x02, 0x00, 0x32, 0x03, 0x00, 0x29, + raw_pdu(0x09, 0x07, 0x02, 0x00, 0xb2, 0x03, 0x00, 0x29, 0x2a), raw_pdu(0x08, 0x03, 0x00, 0x0f, 0x00, 0x03, 0x28), raw_pdu(0x01, 0x08, 0x03, 0x00, 0x0a)); -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html