[Spice-commits] server/red-channel.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Tue Feb 2 12:52:37 UTC 2016
server/red-channel.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
New commits:
commit 8b14dc113c464dd35216dc2d2b295d4555bdaaa5
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Feb 2 12:51:17 2016 +0000
red-channel: send marshaller message fd
Send the fd associated to the last message sent.
Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
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;
More information about the Spice-commits
mailing list