From 263515cd1d7b52ce2ad3dc55a93b9d6f730133f1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 17 Oct 2005 22:23:16 +0000 Subject: * move unicast DNS server registration/browsing routines to their own header dns-srv-rr.h * remove some unused functions * unexport some functions * other cleanups git-svn-id: file:///home/lennart/svn/public/avahi/trunk@803 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe --- avahi-core/timeeventq.c | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) (limited to 'avahi-core/timeeventq.c') diff --git a/avahi-core/timeeventq.c b/avahi-core/timeeventq.c index a259ba6..e8782c9 100644 --- a/avahi-core/timeeventq.c +++ b/avahi-core/timeeventq.c @@ -59,11 +59,17 @@ static int compare(const void* _a, const void* _b) { return avahi_timeval_compare(&a->last_run, &b->last_run); } +static AvahiTimeEvent* time_event_queue_root(AvahiTimeEventQueue *q) { + assert(q); + + return q->prioq->root ? q->prioq->root->data : NULL; +} + static void update_timeout(AvahiTimeEventQueue *q) { AvahiTimeEvent *e; assert(q); - if ((e = avahi_time_event_queue_root(q))) + if ((e = time_event_queue_root(q))) q->poll_api->timeout_update(q->timeout, &e->expiry); else q->poll_api->timeout_update(q->timeout, NULL); @@ -73,7 +79,7 @@ static void expiration_event(AvahiTimeout *timeout, void *userdata) { AvahiTimeEventQueue *q = userdata; AvahiTimeEvent *e; - if ((e = avahi_time_event_queue_root(q))) { + if ((e = time_event_queue_root(q))) { struct timeval now; gettimeofday(&now, NULL); @@ -145,7 +151,7 @@ void avahi_time_event_queue_free(AvahiTimeEventQueue *q) { assert(q); - while ((e = avahi_time_event_queue_root(q))) + while ((e = time_event_queue_root(q))) avahi_time_event_free(e); avahi_prio_queue_free(q->prioq); @@ -219,16 +225,3 @@ void avahi_time_event_update(AvahiTimeEvent *e, const struct timeval *timeval) { update_timeout(e->queue); } -AvahiTimeEvent* avahi_time_event_queue_root(AvahiTimeEventQueue *q) { - assert(q); - - return q->prioq->root ? q->prioq->root->data : NULL; -} - -AvahiTimeEvent* avahi_time_event_next(AvahiTimeEvent *e) { - assert(e); - - return e->node->next->data; -} - - -- cgit