Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.openwrt.org/project/libubox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2015-06-04 16:41:42 +0300
committerFelix Fietkau <nbd@openwrt.org>2015-06-14 16:16:25 +0300
commit8964d77f806291bfbbad6a2e2b530c1838dec29c (patch)
tree83d6ce9cb5afb32bbf8da72c91982496be3e73a7 /ustream-fd.c
parentcead67c804d31cc45cecd6ef8d749c2321b0d8e8 (diff)
ustream-fd: stop trying to read when s->read_blocked is set.
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@gmail.com>
Diffstat (limited to 'ustream-fd.c')
-rw-r--r--ustream-fd.c3
1 files changed, 3 insertions, 0 deletions
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;