Add missing Build-Depends to debian/control
[senf.git] / Socket / FileHandle.cc
index baafe7a..bc8ea9c 100644 (file)
@@ -111,16 +111,16 @@ prefix_ void senf::FileBody::blocking(bool status)
 /* We don't take POLLIN/POLLOUT as argument to avoid having to include
    sys/poll.h in the .cci file (and therefore indirectly into the .hh
    and then every file which uses FileHandle) */
-prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, bool block)
+prefix_ bool senf::FileBody::pollCheck(int fd, bool incoming, int timeout, bool oob)
     const
 {
     struct ::pollfd pfd;
     ::memset(&pfd,0,sizeof(pfd));
     pfd.fd = fd;
-    pfd.events = incoming?POLLIN:POLLOUT;
+    pfd.events = incoming?(oob?POLLPRI:POLLIN):POLLOUT;
     int rv = -1;
     do {
-        rv = ::poll(&pfd,1,block?-1:0);
+        rv = ::poll(&pfd,1,timeout);
         if (rv<0)
             switch (errno) {
             case EINTR: