static void ustream_add_buf(struct ustream_buf_list *l, struct ustream_buf *buf)
{
+ l->buffers++;
if (!l->tail)
l->head = buf;
else
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)
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))
l->data_bytes += maxlen;
}
- if (s->poll && !has_data)
- s->poll(s);
-
return wr;
}