[Spice-devel] [PATCH spice-gtk RFC] Call spice_marshaller_flush on message write

Javier Celaya javier.celaya at flexvdi.com
Mon Jul 27 06:06:12 PDT 2015


spice_marshaller_flush must be called before writing a message to
calculate pointer offsets.
---
 src/spice-channel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/spice-channel.c b/src/spice-channel.c
index c67e0aa..19db676 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -854,6 +854,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);
-- 
2.4.3



More information about the Spice-devel mailing list