
On Wed, Sep 30, 2009 at 01:27:18PM +0200, Chris Lalancette wrote:
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 | 6 ++++-- daemon/stream.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/daemon/stream.c b/daemon/stream.c index 584268d..d64fe73 100644 --- a/daemon/stream.c +++ b/daemon/stream.c @@ -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);
diff --git a/daemon/stream.h b/daemon/stream.h index 2e2d249..181080f 100644 --- a/daemon/stream.h +++ b/daemon/stream.h @@ -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,
ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|