zoom: fix CS write-check
authorAdam Dickmeiss <adam@indexdata.dk>
Mon, 12 Jan 2015 12:26:42 +0000 (13:26 +0100)
committerAdam Dickmeiss <adam@indexdata.dk>
Mon, 12 Jan 2015 12:26:45 +0000 (13:26 +0100)
Thanks to Dennis Schafroth for spotting this.

src/filter_zoom.cpp

index 8ca763b..79bec98 100644 (file)
@@ -2103,7 +2103,7 @@ static bool wait_conn(COMSTACK cs, int secs)
     struct yaz_poll_fd pfd;
 
     yaz_poll_add(pfd.input_mask, yaz_poll_except);
-    if (cs->io_pending && CS_WANT_WRITE)
+    if (cs->io_pending & CS_WANT_WRITE)
         yaz_poll_add(pfd.input_mask, yaz_poll_write);
     if (cs->io_pending & CS_WANT_READ)
         yaz_poll_add(pfd.input_mask, yaz_poll_read);