Signed-off-by: Felix Fietkau <nbd@openwrt.org>
static void pipe_cb(struct ustream *s, int bytes)
{
- struct ustream_buf *buf = s->r.head;
char *newline, *str;
int len;
str = ustream_get_read_buf(s, NULL);
if (!str)
break;
- newline = strchr(buf->data, '\n');
+ newline = strchr(str, '\n');
if (!newline)
break;
*newline = 0;
len = newline + 1 - str;
- syslog(0, buf->data);
+ syslog(0, str);
ustream_consume(s, len);
} while (1);
}