mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 07:29:32 +00:00
red-channel: send marshaller message fd
Send the fd associated to the last message sent. Signed-off-by: Marc-André Lureau <marcandre.lureau@gmail.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
b206efb30b
commit
8b14dc113c
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user