Support incoming connection backends (push to adsbus).

This commit is contained in:
Ian Gulliver
2016-02-17 13:41:33 -08:00
parent 020174d11a
commit 7f8b92deaf
7 changed files with 154 additions and 15 deletions

View File

@@ -38,7 +38,7 @@ ssize_t buf_fill(struct buf *buf, int fd) {
size_t space = BUF_LEN_MAX - buf->length - buf->start;
ssize_t in = read(fd, buf_at(buf, buf->length), space);
if (in < 0) {
if (in <= 0) {
return in;
}
buf->length += in;