On Sun, Mar 04, 2018 at 16:24:21 -0300, Julio Faracco wrote: > When a length of a file is defined, the responsible thread to send > stream is finishing inappropriately. It is happening because there is > wrong conditional which compares an offset with the length and because > of that the code throws ENOSPC error. > > To test it: > virsh# vol-upload ... --length N > > Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx> > --- > src/remote/remote_daemon_stream.c | 24 ++++++++++++------------ > src/util/virfdstream.c | 5 +---- > 2 files changed, 13 insertions(+), 16 deletions(-) > > diff --git a/src/remote/remote_daemon_stream.c b/src/remote/remote_daemon_stream.c > index 4dd3af9e0..998e82a83 100644 > --- a/src/remote/remote_daemon_stream.c > +++ b/src/remote/remote_daemon_stream.c > @@ -549,21 +549,21 @@ daemonStreamHandleWriteData(virNetServerClientPtr client, > } else if (ret == -2) { > /* Blocking, so indicate we have more todo later */ > return 1; > - } else { > - virNetMessageError rerr; > + } else if (ret) { > + virNetMessageError rerr; > > - memset(&rerr, 0, sizeof(rerr)); > + memset(&rerr, 0, sizeof(rerr)); > > - VIR_INFO("Stream send failed"); > - stream->closed = true; > - virStreamEventRemoveCallback(stream->st); > - virStreamAbort(stream->st); > + VIR_INFO("Stream send failed"); > + stream->closed = true; > + virStreamEventRemoveCallback(stream->st); > + virStreamAbort(stream->st); It does not seem to be necessary to change indentation because of your change here.
Attachment:
signature.asc
Description: PGP signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list