]> arthur.barton.de Git - netdata.git/commitdiff
changed PLUS with OR for poll events
authorCosta Tsaousis <costa@tsaousis.gr>
Sun, 29 May 2016 20:52:45 +0000 (23:52 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Sun, 29 May 2016 20:52:45 +0000 (23:52 +0300)
src/web_client.c

index c594ae23c17b0c0a923a3cb7f505586f7e2d9456..b4e07ff48e7e33dba0802d9c6f0299d6d8c48040 100644 (file)
@@ -2134,8 +2134,8 @@ void *web_client_main(void *ptr)
                        fds[0].events = 0;
                        fds[0].revents = 0;
 
-                       if(w->wait_receive) fds[0].events += POLLIN;
-                       if(w->wait_send)    fds[0].events += POLLOUT;
+                       if(w->wait_receive) fds[0].events |= POLLIN;
+                       if(w->wait_send)    fds[0].events |= POLLOUT;
 
                        fds[1].fd = -1;
                        fds[1].events = 0;
@@ -2149,13 +2149,13 @@ void *web_client_main(void *ptr)
                        fds[0].fd = w->ifd;
                        fds[0].events = 0;
                        fds[0].revents = 0;
-                       if(w->wait_receive) fds[0].events += POLLIN;
+                       if(w->wait_receive) fds[0].events |= POLLIN;
                        ifd = &fds[0];
 
                        fds[1].fd = w->ofd;
                        fds[1].events = 0;
                        fds[1].revents = 0;
-                       if(w->wait_send)    fds[1].events += POLLOUT;
+                       if(w->wait_send)    fds[1].events |= POLLOUT;
                        ofd = &fds[1];
 
                        fdmax = 2;