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:
authorFelix Fietkau <nbd@openwrt.org>2013-05-31 13:17:02 +0400
committerFelix Fietkau <nbd@openwrt.org>2013-05-31 13:17:02 +0400
commit70e7c09bcb846e51edefa8baab2018e93d77f8e2 (patch)
tree7bdbbe63a04906949d7c8a05f7f77264d4237cdf /ustream.c
parent54a0b49326904fc3281c72cd9d9f1fe950e39d05 (diff)
ustream: only report a write error once via state_change callback
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'ustream.c')
-rw-r--r--ustream.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ustream.c b/ustream.c
index 719af99..88f1332 100644
--- a/ustream.c
+++ b/ustream.c
@@ -330,8 +330,9 @@ char *ustream_get_read_buf(struct ustream *s, int *buflen)
static void ustream_write_error(struct ustream *s)
{
+ if (!s->write_error)
+ ustream_state_change(s);
s->write_error = true;
- ustream_state_change(s);
}
bool ustream_write_pending(struct ustream *s)