}
if (!check_test_property(received_prop, expected_prop)) {
+ data->if_bluetooth->cancel_discovery();
tester_test_failed();
return;
}
}
+
+ data->if_bluetooth->cancel_discovery();
}
static void remote_getprops_device_found_cb(int num_properties,
if (data->cb_count == 2)
data->cb_count--;
+ data->if_bluetooth->cancel_discovery();
data->if_bluetooth->get_remote_device_properties(&remote_addr);
}
if (data->cb_count == 2)
data->cb_count--;
+ data->if_bluetooth->cancel_discovery();
status = data->if_bluetooth->get_remote_device_property(&remote_addr,
prop.type);
check_expected_status(status);
if (data->cb_count == 3)
data->cb_count--;
+ data->if_bluetooth->cancel_discovery();
status = data->if_bluetooth->set_remote_device_property(&remote_addr,
&prop);
check_expected_status(status);
if (data->cb_count == 2)
data->cb_count--;
+ data->if_bluetooth->cancel_discovery();
status = data->if_bluetooth->set_remote_device_property(&remote_addr,
&prop);
check_expected_status(status);
check_expected_status(status);
}
-static bool pre_inq_compl_hook(const void *dummy, uint16_t len, void *user_data)
-{
- struct test_data *data = tester_get_data();
-
- /* Make sure Inquiry Command Complete is not called */
-
- hciemu_del_hook(data->hciemu, HCIEMU_HOOK_PRE_EVT, BT_HCI_CMD_INQUIRY);
-
- return false;
-}
-
static void test_discovery_stop_success(const void *test_data)
{
struct test_data *data = tester_get_data();
init_test_conditions(data);
- hciemu_add_hook(data->hciemu, HCIEMU_HOOK_PRE_EVT, BT_HCI_CMD_INQUIRY,
- pre_inq_compl_hook, data);
-
data->if_bluetooth->start_discovery();
}
init_test_conditions(data);
- hciemu_add_hook(data->hciemu, HCIEMU_HOOK_PRE_EVT, BT_HCI_CMD_INQUIRY,
- pre_inq_compl_hook, data);
-
data->if_bluetooth->start_discovery();
}