X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fsimple-watch.c;h=65d9d18919ce46c6f0ceb009135d75ee6ea97ab1;hb=50248a63a26c7bfc959813b834e68e2144182146;hp=6531fb773859dc0d7816908de6cfc1531b52ca23;hpb=ed851746209a39f7c835d74aa1996a478e1b7702;p=catta diff --git a/avahi-common/simple-watch.c b/avahi-common/simple-watch.c index 6531fb7..65d9d18 100644 --- a/avahi-common/simple-watch.c +++ b/avahi-common/simple-watch.c @@ -31,9 +31,9 @@ #include #include -#include -#include - +#include "llist.h" +#include "malloc.h" +#include "timeval.h" #include "simple-watch.h" struct AvahiWatch { @@ -519,7 +519,7 @@ finish: int avahi_simple_poll_run(AvahiSimplePoll *s) { assert(s); - assert(s->state == STATE_PREPARED); + assert(s->state == STATE_PREPARED || s->state == STATE_FAILURE); s->state = STATE_RUNNING; @@ -619,7 +619,7 @@ const AvahiPoll* avahi_simple_poll_get(AvahiSimplePoll *s) { return &s->api; } -static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, void *userdata) { +static int system_poll(struct pollfd *ufds, unsigned int nfds, int timeout, AVAHI_GCC_UNUSED void *userdata) { return poll(ufds, nfds, timeout); } @@ -640,5 +640,6 @@ int avahi_simple_poll_loop(AvahiSimplePoll *s) { for (;;) if ((r = avahi_simple_poll_iterate(s, -1)) != 0) - return r; + if (r >= 0 || errno != EINTR) + return r; }