diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-10-02 02:16:02 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-10-02 02:16:02 +0000 |
commit | d3e893754d3158b72d488e515535dfcac980e1c3 (patch) | |
tree | 9896b619589fa78ebfa6692f28bab06636b3a3cf /avahi-common/watch-test.c | |
parent | cc9205deaefa0e2f1222298aa64bb456da009fb2 (diff) |
* Split up avahi_simple_poll_iterate() into avahi_simple_poll_prepare(),avahi_simple_poll_run() and avahi_simple_poll_dispatch()
* Export wakeup function()
* add a userdata argument to poll() function
* add avahi_simple_poll_loop()
* minimize number of system calls
* threading compat improvements
* request pollfd rebuild in avahi_simple_poll_new()
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@671 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe
Diffstat (limited to 'avahi-common/watch-test.c')
-rw-r--r-- | avahi-common/watch-test.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/avahi-common/watch-test.c b/avahi-common/watch-test.c index ffb2149..921a8f7 100644 --- a/avahi-common/watch-test.c +++ b/avahi-common/watch-test.c @@ -78,9 +78,10 @@ int main(int argc, char *argv[]) { api->timeout_new(api, &tv, wakeup, NULL); /* Our main loop */ - for (;;) - if (avahi_simple_poll_iterate(simple_poll, -1) != 0) - break; + avahi_simple_poll_loop(simple_poll); + + + avahi_simple_poll_free(simple_poll); return 0; } |