#include <sys/poll.h>
#include <sys/time.h>
-#include <pulse/pulseaudio.h>
-
#include "ursaryd.h"
struct pmain_io {
static struct main_hook pmain_gc_hook;
-static void pmain_trigger_gc(void);
+static void pmain_schedule_gc(void);
struct pa_mainloop_api pmain_api = {
.io_new = pmain_io_new,
return io;
}
- struct pmain_io *io = xmalloc(sizeof(*io));
+ struct pmain_io *io = xmalloc_zero(sizeof(*io));
io->f.fd = fd;
io->f.data = io;
clist_add_tail(&pmain_io_list, &io->n);
DBG("Pulse: Deleting IO %p for fd %d", e, e->io->f.fd);
pmain_io_enable(e, 0);
clist_add_tail(&pmain_io_gc_list, &e->gc_n);
- pmain_trigger_gc();
+ pmain_schedule_gc();
}
static void pmain_io_set_destroy(pa_io_event *e, pa_io_event_destroy_cb_t cb)
DBG("Pulse: Timer %p deleted", e);
timer_del(&e->t);
clist_add_tail(&pmain_time_gc_list, &e->n);
- pmain_trigger_gc();
+ pmain_schedule_gc();
}
static void pmain_time_set_destroy(pa_time_event *e, pa_time_event_destroy_cb_t cb)
DBG("Pulse: Deferred event %p deleted", e);
hook_del(&e->h);
clist_add_tail(&pmain_defer_gc_list, &e->n);
- pmain_trigger_gc();
+ pmain_schedule_gc();
}
static void pmain_defer_set_destroy(pa_defer_event *e, pa_defer_event_destroy_cb_t cb)
return HOOK_RETRY;
}
-static void pmain_trigger_gc(void)
+static void pmain_schedule_gc(void)
{
hook_add(&pmain_gc_hook);
}