diff options
Diffstat (limited to 'buffered_file.c')
-rw-r--r-- | buffered_file.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/buffered_file.c b/buffered_file.c index 54dc6c29ba..a79264f451 100644 --- a/buffered_file.c +++ b/buffered_file.c @@ -156,6 +156,14 @@ static int buffered_put_buffer(void *opaque, const uint8_t *buf, int64_t pos, in offset = size; } + if (pos == 0 && size == 0) { + DPRINTF("file is ready\n"); + if (s->bytes_xfer <= s->xfer_limit) { + DPRINTF("notifying client\n"); + s->put_ready(s->opaque); + } + } + return offset; } |