]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Let remoteClientStream only do RX if requested.
authorChris Lalancette <clalance@redhat.com>
Wed, 30 Sep 2009 10:47:43 +0000 (12:47 +0200)
committerChris Lalancette <clalance@redhat.com>
Wed, 30 Sep 2009 12:05:41 +0000 (14:05 +0200)
Right now, the stream stuff assumes that a stream is always
going to be used for transmit.  This is not the case, and in
fact doesn't work with the tunnelled migration stuff.  Add
a flag to remoteClientStream() to allow it to do RX only.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
daemon/stream.c
daemon/stream.h

index 584268dc4256cd072586e5fa5d3a5cd1b3d26855..d64fe739e9f096830c06dd1d002376e0488328ca 100644 (file)
@@ -259,7 +259,8 @@ void remoteFreeClientStream(struct qemud_client *client,
  * @stream: a stream to add
  */
 int remoteAddClientStream(struct qemud_client *client,
-                          struct qemud_client_stream *stream)
+                          struct qemud_client_stream *stream,
+                          int transmit)
 {
     struct qemud_client_stream *tmp = client->streams;
 
@@ -280,7 +281,8 @@ int remoteAddClientStream(struct qemud_client *client,
     stream->filter.next = client->filters;
     client->filters = &stream->filter;
 
-    stream->tx = 1;
+    if (transmit)
+        stream->tx = 1;
 
     remoteStreamUpdateEvents(stream);
 
index 2e2d249517fdb298e6a13134aecea5460d7a50a4..181080f87c5de3b9314f33a066a8c703c9c4fef0 100644 (file)
@@ -36,7 +36,8 @@ void remoteFreeClientStream(struct qemud_client *client,
                             struct qemud_client_stream *stream);
 
 int remoteAddClientStream(struct qemud_client *client,
-                          struct qemud_client_stream *stream);
+                          struct qemud_client_stream *stream,
+                          int transmit);
 
 struct qemud_client_stream *
 remoteFindClientStream(struct qemud_client *client,