]> git.meshlink.io Git - catta/blobdiff - avahi-common/simple-watch.c
forgot to pull the publish_no_reverse change to the example.
[catta] / avahi-common / simple-watch.c
index 56c2ccb81c0bcb5db1d9e6caf9bb3ef85a4ee5da..8df18dd7737236b2f3fa0956d025d912cfcd90c1 100644 (file)
@@ -521,9 +521,19 @@ int avahi_simple_poll_run(AvahiSimplePoll *s) {
 
     s->state = STATE_RUNNING;
 
-    if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
-        s->state = STATE_FAILURE;
-        return -1;
+    for (;;) {
+        errno = 0;
+
+        if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
+
+            if (errno == EINTR)
+                continue;
+
+            s->state = STATE_FAILURE;
+            return -1;
+        }
+
+        break;
     }
 
     /* The poll events are now valid again */