diff options
author | Jakub Tyszkowski <jakub.tyszkowski@tieto.com> | 2015-02-13 14:17:40 +0100 |
---|---|---|
committer | Szymon Janc <szymon.janc@tieto.com> | 2015-02-19 11:02:15 +0100 |
commit | a980d1569eaf1074f728fc1c41d6a85e58c1f5af (patch) | |
tree | de6dbb6f408382a989afe8cfc87627df5feacc45 /android/tester-gatt.c | |
parent | 89f820abe487185f7503b0714844404fed1e2685 (diff) | |
download | bluez-a980d1569eaf1074f728fc1c41d6a85e58c1f5af.tar.gz |
android/tester: Add test for GATT server app indication confirmation
This adds checking if sent indication or notification has been confirmed
over HAL.
Diffstat (limited to 'android/tester-gatt.c')
-rw-r--r-- | android/tester-gatt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/android/tester-gatt.c b/android/tester-gatt.c index 38dfe42f0..1c0397ebd 100644 --- a/android/tester-gatt.c +++ b/android/tester-gatt.c @@ -1612,7 +1612,7 @@ static void gatt_cid_hook_cb(const void *data, uint16_t len, void *user_data) step->callback = CB_EMU_VALUE_INDICATION; schedule_callback_verification(step); - break; + goto respond; case L2CAP_ATT_HANDLE_VALUE_NOTIFY: step = g_new0(struct step, 1); @@ -1649,6 +1649,7 @@ static void gatt_cid_hook_cb(const void *data, uint16_t len, void *user_data) break; } +respond: if (memcmp(gatt_pdu->iov_base, data, len)) { tester_print("Incoming data mismatch"); break; @@ -3258,6 +3259,7 @@ static struct test_case test_cases[] = { ACTION_SUCCESS(gatt_server_send_indication_action, &send_indication_data_1), CALLBACK(CB_EMU_VALUE_INDICATION), + CALLBACK_GATTS_NOTIF_CONF(CONN1_ID, GATT_STATUS_SUCCESS), ACTION_SUCCESS(bluetooth_disable_action, NULL), CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF), ), @@ -3281,6 +3283,7 @@ static struct test_case test_cases[] = { CONN1_ID, APP1_ID), ACTION_SUCCESS(gatt_server_send_indication_action, &send_indication_data_2), + CALLBACK_GATTS_NOTIF_CONF(CONN1_ID, GATT_STATUS_SUCCESS), CALLBACK(CB_EMU_VALUE_NOTIFICATION), ACTION_SUCCESS(bluetooth_disable_action, NULL), CALLBACK_STATE(CB_BT_ADAPTER_STATE_CHANGED, BT_STATE_OFF), |