]> git.meshlink.io Git - catta/commitdiff
Remove an invalid optimization in avahi_simple_poll_run(). (Closes #132)
authorLennart Poettering <lennart@poettering.net>
Sat, 14 Apr 2007 22:38:15 +0000 (22:38 +0000)
committerLennart Poettering <lennart@poettering.net>
Sat, 14 Apr 2007 22:38:15 +0000 (22:38 +0000)
git-svn-id: file:///home/lennart/svn/public/avahi/trunk@1425 941a03a8-eaeb-0310-b9a0-b1bbd8fe43fe

avahi-common/simple-watch.c

index 65d9d18919ce46c6f0ceb009135d75ee6ea97ab1..c970c3c4afdb5fedd9d2f1d5aaa9f17889bb5d70 100644 (file)
@@ -523,17 +523,13 @@ int avahi_simple_poll_run(AvahiSimplePoll *s) {
     
     s->state = STATE_RUNNING;
 
-    if (s->prepared_timeout != 0) {
-    
-        if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
-            s->state = STATE_FAILURE;
-            return -1;
-        }
+    if (s->poll_func(s->pollfds, s->n_pollfds, s->prepared_timeout, s->poll_func_userdata) < 0) {
+        s->state = STATE_FAILURE;
+        return -1;
+    }
         
-        /* The poll events are now valid again */
-        s->events_valid = 1;
-    } else
-        s->events_valid = 0;
+    /* The poll events are now valid again */
+    s->events_valid = 1;
         
     /* Update state */
     s->state = STATE_RAN;