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 <clalance@redhat.com>
This commit is contained in:
Chris Lalancette 2009-09-30 12:47:43 +02:00
parent 47c8709564
commit 15bfedcbbd
2 changed files with 6 additions and 3 deletions

View 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);

View 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,