}
static void
-exit_test(int sig)
+destroy(tdm_test_server *data)
{
- tdm_test_server *data = &tts_data;
tdm_test_server_output *o = NULL, *oo = NULL;
tdm_test_server_layer *l = NULL, *ll = NULL;
tdm_test_server_pp *p = NULL, *pp = NULL;
tdm_test_server_prop *w = NULL, *ww = NULL;
int i;
- printf("got signal: %d\n", sig);
-
LIST_FOR_EACH_ENTRY_SAFE(c, cc, &data->capture_list, link) {
LIST_DEL(&c->link);
tdm_capture_destroy(c->capture);
printf("SCREEN_PREROTATION_HINT = %d", tts_screen_prerotation_hint);
}
- signal(SIGINT, exit_test); /* 2 */
- signal(SIGTERM, exit_test); /* 15 */
-
memset(data, 0, sizeof * data);
LIST_INITHEAD(&data->output_list);
LIST_INITHEAD(&data->pp_list);
while (1)
tdm_display_handle_events(data->display);
+ destroy(data);
+
return;
no_pp:
printf("no PP capability\n");