diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-10-17 22:23:16 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-10-17 22:23:16 +0000 |
commit | 263515cd1d7b52ce2ad3dc55a93b9d6f730133f1 (patch) | |
tree | 89ac4314dea5cb976fdbffcd8eefce1d7e0222ea /avahi-core/timeeventq.c | |
parent | 55f7dcb690bcbdf6bca6568e0d9aacb2456811a5 (diff) |
* 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
Diffstat (limited to 'avahi-core/timeeventq.c')
-rw-r--r-- | avahi-core/timeeventq.c | 25 |
1 files changed, 9 insertions, 16 deletions
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; -} - - |