[libvirt] [ruby-libvirt] Don't make volume upload zero bytes

Chris Lalancette clalancette at gmail.com
Fri Jun 10 19:58:09 UTC 2016


On Fri, Jun 10, 2016 at 11:10 AM, Guido Günther <agx at sigxcpu.org> wrote:

> The virStreamSourceFunc internal_sendall currently returns the first
> value passed in from the block, which according the ruby-libvirt docs
> should be zero:
>
>   The send block should return an array of 2 elements; the first element
>   should be the return code from the block (-1 for error, 0 otherwise)
>
> But according to the libvirt docs of virStreamSourceFunc this indicates
> EOF:
>
>   Returns:  the number of bytes filled, 0 upon end of file, or -1 upon
> error
>
> So return the size of the buffer to unbreak volume uploads.


This looks OK to me, so I applied it, thanks.  I really should add an
example of virStream to the examples on the website; do you happen to have
a relatively simple example that I could put up there?

Thanks,
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160610/d783123a/attachment-0001.htm>


More information about the libvir-list mailing list