X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;f=ustream-fd.c;fp=ustream-fd.c;h=0cd2eb3d7915c1e18e8e7d683afbc8aa52006dca;hb=300a809a7a6b30595962308c4215ead6ec361053;hp=6bb39e934e5dfd960cef528f0dcf2bef998c21d2;hpb=84822fd6d529abc35bf8023403d547f8001bf5f3;p=project%2Flibubox.git diff --git a/ustream-fd.c b/ustream-fd.c index 6bb39e9..0cd2eb3 100644 --- a/ustream-fd.c +++ b/ustream-fd.c @@ -105,7 +105,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); } @@ -122,7 +122,7 @@ static bool ustream_fd_poll(struct ustream *s) { struct ustream_fd *sf = container_of(s, struct ustream_fd, stream); - return __ustream_fd_poll(sf, ULOOP_READ); + return __ustream_fd_poll(sf, ULOOP_READ | ULOOP_WRITE); } static void ustream_uloop_cb(struct uloop_fd *fd, unsigned int events)