From: Chris Lalancette Date: Wed, 30 Sep 2009 10:47:43 +0000 (+0200) Subject: Let remoteClientStream only do RX if requested. X-Git-Tag: v0.7.2~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15bfedcbbd5b7f9c53a690ec76def90026ce7c3e;p=thirdparty%2Flibvirt.git 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 --- 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,