[OpenWrt-Devel] [PATCH 3/5] ustream-fd: fix logic invert of write polling.

Yousong Zhou yszhou4tech at gmail.com
Wed Jan 21 08:21:26 EST 2015


ustream_write_pending() returns true if write buffer was flushed there.

Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
 ustream-fd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ustream-fd.c b/ustream-fd.c
index 4abb530..bc44d4a 100644
--- a/ustream-fd.c
+++ b/ustream-fd.c
@@ -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);
 	}
 
-- 
2.2.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list