Re: [libvirt] [PATCH 1/2] libvirt-rust: Fix bugs in Stream::recv

2019-09-23 Thread Martin Kletzander
On Sun, Sep 22, 2019 at 04:38:26PM +, Linus Färnstrand wrote: ‐‐‐ Original Message ‐‐‐ On Friday, September 20, 2019 9:58 AM, Martin Kletzander wrote: On Thu, Sep 19, 2019 at 05:48:37AM +, Linus Färnstrand wrote: > - pass same size to virStreamRecv as the buffer has

Re: [libvirt] [PATCH 1/2] libvirt-rust: Fix bugs in Stream::recv

2019-09-22 Thread Linus Färnstrand
‐‐‐ Original Message ‐‐‐ On Friday, September 20, 2019 9:58 AM, Martin Kletzander wrote: > On Thu, Sep 19, 2019 at 05:48:37AM +, Linus Färnstrand wrote: > > > - pass same size to virStreamRecv as the buffer has allocated > > - Handle -2 error case > > - Fix FFI declaration

Re: [libvirt] [PATCH 1/2] libvirt-rust: Fix bugs in Stream::recv

2019-09-20 Thread Martin Kletzander
On Thu, Sep 19, 2019 at 05:48:37AM +, Linus Färnstrand wrote: * pass same size to virStreamRecv as the buffer has allocated * Handle -2 error case * Fix FFI declaration to take size_t instead of c_uint * Allow user to pass in buffer. To allow user to decide where to allocate it. And to be

[libvirt] [PATCH 1/2] libvirt-rust: Fix bugs in Stream::recv

2019-09-19 Thread Linus Färnstrand
* pass same size to virStreamRecv as the buffer has allocated * Handle -2 error case * Fix FFI declaration to take size_t instead of c_uint * Allow user to pass in buffer. To allow user to decide where to allocate it. And to be able to re-use the same buffer * Don't try to treat binary data as a