|
|
|
@ -142,6 +142,7 @@ void timerthread_queue_run(void *ptr) {
|
|
|
|
|
|
|
|
|
|
|
|
static int ttqe_free_all(void *k, void *v, void *d) {
|
|
|
|
static int ttqe_free_all(void *k, void *v, void *d) {
|
|
|
|
struct timerthread_queue *ttq = d;
|
|
|
|
struct timerthread_queue *ttq = d;
|
|
|
|
|
|
|
|
if (ttq->entry_free_func)
|
|
|
|
ttq->entry_free_func(k);
|
|
|
|
ttq->entry_free_func(k);
|
|
|
|
return FALSE;
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -266,6 +267,7 @@ unsigned int timerthread_queue_flush(struct timerthread_queue *ttq, void *ptr) {
|
|
|
|
while (matches.length) {
|
|
|
|
while (matches.length) {
|
|
|
|
struct timerthread_queue_entry *ttqe = g_queue_pop_head(&matches);
|
|
|
|
struct timerthread_queue_entry *ttqe = g_queue_pop_head(&matches);
|
|
|
|
g_tree_remove(ttq->entries, ttqe);
|
|
|
|
g_tree_remove(ttq->entries, ttqe);
|
|
|
|
|
|
|
|
if (ttq->entry_free_func)
|
|
|
|
ttq->entry_free_func(ttqe);
|
|
|
|
ttq->entry_free_func(ttqe);
|
|
|
|
num++;
|
|
|
|
num++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|