Re: [PATCH 2/7] If receiving a stream error, mark EOF on the stream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/07/2011 09:56 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>

If we receive an error on the stream, set the EOF marker so
that any further (bogus) incoming data is dropped.

* src/rpc/virnetclientstream.c: Set EOF on stream
---
  src/rpc/virnetclientstream.c |    3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/rpc/virnetclientstream.c b/src/rpc/virnetclientstream.c
index 4cd0295..7e2d9ae 100644
--- a/src/rpc/virnetclientstream.c
+++ b/src/rpc/virnetclientstream.c
@@ -268,6 +268,9 @@ int virNetClientStreamSetError(virNetClientStreamPtr st,
      st->err.int1 = err.int1;
      st->err.int2 = err.int2;

+    st->incomingEOF = true;
+    virNetClientStreamEventTimerUpdate(st);
+
      ret = 0;

  cleanup:

ACK.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]