Message ID | 1282223922-5971-3-git-send-email-lcapitulino@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/buffered_file.c b/buffered_file.c index be147d6..1836e7e 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; }