Commit graph

16 commits

Author SHA1 Message Date
Felix Fietkau
bc7e277276 ustream-fd: handle ENOTCONN for read/write on not-yet-connected sockets
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2016-01-15 21:35:48 +01:00
Philip Craig
e88d816d6e ustream-fd: handle uloop errors
The default uloop error handling is to delete the fd. Continue to do
that, but also set the write_error flag and notify the user.

Signed-off-by: Philip Craig <philipjcraig@gmail.com>
2015-07-14 16:57:05 +02:00
Yousong Zhou
8964d77f80 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>
2015-06-14 15:16:25 +02:00
Yousong Zhou
cead67c804 ustream-fd: readability change.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-06-14 15:16:10 +02:00
Yousong Zhou
73c4b4fdfe ustream-fd: fix logic invert of write polling.
ustream_write_pending() returns true if write buffer was flushed there.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-01-21 20:02:03 +01:00
Felix Fietkau
2851ce7edb ustream: only report stream eof once via state_change callback
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-05-31 11:18:26 +02:00
Felix Fietkau
f83b6548c7 ustream-fd: do not loop back into the callback from ustream_fd_set_uloop
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-31 17:08:40 +01:00
Felix Fietkau
bc6a230b50 ustream: set the right EOF flag
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-31 17:02:49 +01:00
Felix Fietkau
f24b6294c2 ustream-fd: only use read() == 0 as eof indication, and issue a state change notification when that happens
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-30 17:48:55 +01:00
Felix Fietkau
f15ceb8ced ustream-fd: retry partial writes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-22 10:09:55 +01:00
Felix Fietkau
5bbedafe09 ustream-fd: prevent callbacks during init
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:45 +01:00
Felix Fietkau
6c28da1ae2 ustream-fd: fix read error handling
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2013-01-03 16:32:40 +01:00
Felix Fietkau
29c066cfd6 ustream: avoid calling s->poll from a write path to avoid looping back through the notify_write cb
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-30 19:21:03 +01:00
Felix Fietkau
300a809a7a ustream: fix polling for write buffer availability after buffering writes
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2012-12-30 17:26:40 +01:00
Felix Fietkau
dc69ce4799 ustream: add a poll callback function defined by the ustream implementation 2012-10-29 23:39:48 +01:00
Felix Fietkau
768a69b3ce add ustream, an api for stream buffer management 2012-10-21 23:00:06 +02:00