From: Marc-André Lureau <mlureau@xxxxxxxxxx> Send the fd associated to the last message sent. Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx> --- server/red-channel.c | 14 ++++++++++++++ spice-common | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/server/red-channel.c b/server/red-channel.c index fd41493..33d4158 100644 --- a/server/red-channel.c +++ b/server/red-channel.c @@ -608,8 +608,22 @@ static inline void red_channel_client_release_sent_item(RedChannelClient *rcc) static void red_channel_peer_on_out_msg_done(void *opaque) { RedChannelClient *rcc = (RedChannelClient *)opaque; + int fd; rcc->send_data.size = 0; + + if (spice_marshaller_get_fd(rcc->send_data.marshaller, &fd)) { + if (reds_stream_send_msgfd(rcc->stream, fd) < 0) { + perror("sendfd"); + red_channel_client_disconnect(rcc); + if (fd != -1) + close(fd); + return; + } + if (fd != -1) + close(fd); + } + red_channel_client_release_sent_item(rcc); if (rcc->send_data.blocked) { rcc->send_data.blocked = FALSE; diff --git a/spice-common b/spice-common index 93cd2f6..ae8b534 160000 --- a/spice-common +++ b/spice-common @@ -1 +1 @@ -Subproject commit 93cd2f683650f1bce46d22fd368f5d81614a117f +Subproject commit ae8b5345931b3225d0d9bd252c93c726a8e5684c -- 2.5.0 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel