[Spice-commits] src/spice-channel.c
Pavel Grunt
pgrunt at kemper.freedesktop.org
Thu Jun 29 21:08:09 UTC 2017
src/spice-channel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 514c942f36725d944a88b94809d49f8f4cc1e1f8
Author: Pavel Grunt <pgrunt at redhat.com>
Date: Thu Jun 29 12:38:35 2017 +0200
spice-channel: Store the caps correctly
The commit babe5630d5d3242b1d186cccdd5b4d51debe78e9 forgot to update
position of the caps pointer making remote caps to not be stored.
That cause strange behavior in remote-viewer - it always opened window
for each remote display.
Signed-off-by: Victor Toso <victortoso at redhat.com>
Signed-off-by: Pavel Grunt <pgrunt at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/src/spice-channel.c b/src/spice-channel.c
index 418e2b7..b8cf19c 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -1938,8 +1938,9 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel)
CHANNEL_DEBUG(channel, "got common caps %d:0x%X", i, *caps);
}
- g_array_set_size(c->remote_caps, num_channel_caps);
caps_src += num_common_caps * sizeof(uint32_t);
+ g_array_set_size(c->remote_caps, num_channel_caps);
+ caps = &g_array_index(c->remote_caps, uint32_t, 0);
memcpy(caps, caps_src, num_channel_caps * sizeof(uint32_t));
for (i = 0; i < num_channel_caps; i++, caps++) {
*caps = GUINT32_FROM_LE(*caps);
More information about the Spice-commits
mailing list