summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Celaya <javier.celaya@flexvdi.com>2015-07-27 15:06:12 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2015-12-10 09:16:30 +0100
commitb7ed56622b2039b2c91fc886f58552b4939a121d (patch)
tree5ff921b29c5f2e15463d257b27b3efc778a4542c
parent34c839bf0376aa76627f4ca8d3d836a5e60fe451 (diff)
downloadspice-gtk-b7ed56622b2039b2c91fc886f58552b4939a121d.tar.gz
spice-gtk-b7ed56622b2039b2c91fc886f58552b4939a121d.tar.xz
spice-gtk-b7ed56622b2039b2c91fc886f58552b4939a121d.zip
Call spice_marshaller_flush on message write
spice_marshaller_flush must be called before writing a message to calculate pointer offsets. This is only an issue when ptr submarshallers are used, which currently is only used by Tunnel::service_add. Since this is disabled by default, this buug is not going to be hit by the current codebase.
-rw-r--r--src/spice-channel.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/spice-channel.c b/src/spice-channel.c
index d8bba5c..a2a6cb9 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -858,6 +858,7 @@ static void spice_channel_write_msg(SpiceChannel *channel, SpiceMsgOut *out)
return;
}
+ spice_marshaller_flush(out->marshaller);
msg_size = spice_marshaller_get_total_size(out->marshaller) -
spice_header_get_header_size(channel->priv->use_mini_header);
spice_header_set_msg_size(out->header, channel->priv->use_mini_header, msg_size);