guint host_source;
guint master_source;
guint client_source;
+ guint start_source;
struct queue *post_command_hooks;
char bdaddr_str[18];
{
struct hciemu *hciemu = user_data;
+ hciemu->start_source = 0;
+
bthost_start(hciemu->host_stack);
return FALSE;
return NULL;
}
- g_idle_add(start_stack, hciemu);
+ hciemu->start_source = g_idle_add(start_stack, hciemu);
return hciemu_ref(hciemu);
}
queue_destroy(hciemu->post_command_hooks, destroy_command_hook);
+ if (hciemu->start_source)
+ g_source_remove(hciemu->start_source);
+
g_source_remove(hciemu->host_source);
g_source_remove(hciemu->client_source);
g_source_remove(hciemu->master_source);
if (test->stage != TEST_STAGE_PRE_SETUP)
return;
+ if (test->timeout_id > 0) {
+ g_source_remove(test->timeout_id);
+ test->timeout_id = 0;
+ }
+
print_progress(test->name, COLOR_RED, "pre setup failed");
g_idle_add(done_callback, test);