From 15bfedcbbd5b7f9c53a690ec76def90026ce7c3e Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Wed, 30 Sep 2009 12:47:43 +0200 Subject: [PATCH] Let remoteClientStream only do RX if requested. 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 --- 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 584268dc42..d64fe739e9 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 2e2d249517..181080f87c 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, -- GitLab