diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-08-10 13:00:12 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-08-10 13:00:12 +0000 |
commit | 37d930ac4afa9642b7b918b60ca0e0cb42b50682 (patch) | |
tree | 4d7c2c87f91533d688da9299a471caf4a208bd09 /polyp/glib-mainloop.c | |
parent | e9bed206d22c6985bce66d09867dc1256b9fc2e6 (diff) |
glib mainloop fix
implement server status command
support for sink_list/source_list in polyplib
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@110 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/glib-mainloop.c')
-rw-r--r-- | polyp/glib-mainloop.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/polyp/glib-mainloop.c b/polyp/glib-mainloop.c index 0c46ab0c..9abb1e47 100644 --- a/polyp/glib-mainloop.c +++ b/polyp/glib-mainloop.c @@ -213,7 +213,7 @@ static gboolean time_cb(gpointer data) { static void glib_time_restart(struct pa_time_event*e, const struct timeval *tv) { struct timeval now; - assert(e && e->mainloop); + assert(e && e->mainloop && !e->dead); gettimeofday(&now, NULL); if (e->source) { @@ -233,7 +233,7 @@ static void glib_time_restart(struct pa_time_event*e, const struct timeval *tv) } static void glib_time_free(struct pa_time_event *e) { - assert(e && e->mainloop); + assert(e && e->mainloop && !e->dead); if (e->source) { g_source_destroy(e->source); @@ -317,8 +317,8 @@ static void glib_defer_enable(struct pa_defer_event *e, int b) { } static void glib_defer_free(struct pa_defer_event *e) { - assert(e && e->mainloop); - + assert(e && e->mainloop && !e->dead); + if (e->source) { g_source_destroy(e->source); g_source_unref(e->source); @@ -486,6 +486,10 @@ static gboolean free_dead_events(gpointer p) { free_defer_events(g->dead_defer_events); free_time_events(g->dead_time_events); + g->dead_io_events = NULL; + g->dead_defer_events = NULL; + g->dead_time_events = NULL; + g_source_destroy(g->cleanup_source); g_source_unref(g->cleanup_source); g->cleanup_source = NULL; |