X-Git-Url: http://git.archive.openwrt.org/?p=project%2Flibubox.git;a=blobdiff_plain;f=ustream.c;h=719af992030e76d11529cca1c813f3ab0738e74d;hp=37fbaf76d03111d05a352f4891d47d1f8b5d0741;hb=d01922625d21f97fcab757d0299586178333f1e0;hpb=300a809a7a6b30595962308c4215ead6ec361053 diff --git a/ustream.c b/ustream.c index 37fbaf7..719af99 100644 --- a/ustream.c +++ b/ustream.c @@ -37,6 +37,7 @@ static void ustream_init_buf(struct ustream_buf *buf, int len) static void ustream_add_buf(struct ustream_buf_list *l, struct ustream_buf *buf) { + l->buffers++; if (!l->tail) l->head = buf; else @@ -379,7 +380,6 @@ static int ustream_write_buffered(struct ustream *s, const char *data, int len, struct ustream_buf_list *l = &s->w; struct ustream_buf *buf; int maxlen; - bool has_data = !!s->w.data_bytes; while (len) { if (!ustream_prepare_buf(s, &s->w, len)) @@ -399,9 +399,6 @@ static int ustream_write_buffered(struct ustream *s, const char *data, int len, l->data_bytes += maxlen; } - if (s->poll && !has_data) - s->poll(s); - return wr; }