From d3e893754d3158b72d488e515535dfcac980e1c3 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 2 Oct 2005 02:16:02 +0000 Subject: * 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 --- avahi-common/watch-test.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'avahi-common/watch-test.c') 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; } -- cgit