[OpenWrt-Devel] [PATCH 5/5] ustream-fd: stop trying to read when s->read_blocked is set.
Yousong Zhou
yszhou4tech at gmail.com
Thu Jun 4 09:41:42 EDT 2015
User's s->notify_read is called in ustream_fill_read(). If
s->read_blocked is set there, then stop reading more.
Signed-off-by: Yousong Zhou <yszhou4tech at gmail.com>
---
ustream-fd.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/ustream-fd.c b/ustream-fd.c
index daef499..5ffca53 100644
--- a/ustream-fd.c
+++ b/ustream-fd.c
@@ -50,6 +50,9 @@ static void ustream_fd_read_pending(struct ustream_fd *sf, bool *more)
char *buf;
do {
+ if (s->read_blocked)
+ break;
+
buf = ustream_reserve(s, 1, &buflen);
if (!buf)
break;
--
1.7.10.4
_______________________________________________
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