diff --git a/android/android-tester.c b/android/android-tester.c
index 6d2edc7..e7a8280 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
{
struct test_data *data = tester_get_data();
- if (state == BT_DISCOVERY_STARTED && data->cb_count == 4) {
+ if (state == BT_DISCOVERY_STARTED && data->cb_count == 3) {
data->cb_count--;
return;
}
bdaddr2android((const bdaddr_t *)bdaddr, &remote_addr.address);
- if (data->cb_count == 3)
+ 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);
+
+ status = data->if_bluetooth->get_remote_device_property(&remote_addr, prop.type);
}
static void remote_setprop_fail_device_found_cb(int num_properties,
check_expected_property(properties[i]);
}
-static void remote_setprop_device_properties_cb(bt_status_t status,
- bt_bdaddr_t *bd_addr, int num_properties,
- bt_property_t *properties)
-{
- int i;
- struct test_data *data = tester_get_data();
- const struct generic_data *test = data->test_data;
- uint8_t *bdaddr = (uint8_t *)hciemu_get_client_bdaddr(data->hciemu);
- bt_bdaddr_t remote_addr;
- const bt_property_t prop = test->expected_properties[1].prop;
-
- for (i = 0; i < num_properties; i++)
- check_expected_property(properties[i]);
-
- if (g_slist_length(data->expected_properties_list) == 1) {
- bdaddr2android((const bdaddr_t *)bdaddr, &remote_addr.address);
- data->cb_count--;
- check_cb_count();
- data->if_bluetooth->get_remote_device_property(&remote_addr,
- prop.type);
- }
-}
-
static gboolean remote_device_properties(gpointer user_data)
{
struct test_data *data = tester_get_data();
.prop.val = &remote_setprop_fname_val,
.prop.len = sizeof(remote_setprop_fname_val) - 1,
},
- {
- .prop.type = BT_PROPERTY_REMOTE_FRIENDLY_NAME,
- .prop.val = &remote_setprop_fname_val,
- .prop.len = sizeof(remote_setprop_fname_val) - 1,
- },
};
static const struct generic_data bt_dev_setprop_fname_success_test = {
remote_setprop_disc_state_changed_cb,
.expected_hal_cb.device_found_cb = remote_setprop_device_found_cb,
.expected_hal_cb.remote_device_properties_cb =
- remote_setprop_device_properties_cb,
- .expected_cb_count = 4,
- .expected_properties_num = 2,
+ remote_test_device_properties_cb,
+ .expected_cb_count = 3,
+ .expected_properties_num = 1,
.expected_properties = remote_setprop_fname_props,
.expected_adapter_status = BT_STATUS_SUCCESS,
};