ustream-fd: fix logic invert of write polling.
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 21 Jan 2015 13:21:26 +0000 (21:21 +0800)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 21 Jan 2015 19:02:03 +0000 (20:02 +0100)
ustream_write_pending() returns true if write buffer was flushed there.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
ustream-fd.c

index 4abb530..bc44d4a 100644 (file)
@@ -119,7 +119,7 @@ static bool __ustream_fd_poll(struct ustream_fd *sf, unsigned int events)
                ustream_fd_read_pending(sf, &more);
 
        if (events & ULOOP_WRITE) {
-               if (!ustream_write_pending(s))
+               if (ustream_write_pending(s))
                        ustream_fd_set_uloop(s, false);
        }