From: Yousong Zhou Date: Thu, 4 Jun 2015 13:41:42 +0000 (+0800) Subject: ustream-fd: stop trying to read when s->read_blocked is set. X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=commitdiff_plain;h=8964d77f806291bfbbad6a2e2b530c1838dec29c 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 --- 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;