[Spice-devel] [PATCH spice-gtk 4/6] spice-channel: Move setting of header->size to spice_channel_write_msg()
Marc-André Lureau
marcandre.lureau at gmail.com
Fri Dec 2 08:52:03 PST 2011
ack
On Thu, Dec 1, 2011 at 4:48 PM, Hans de Goede <hdegoede at redhat.com> wrote:
> Just a small cleanup patch.
>
> Signed-off-by: Hans de Goede <hdegoede at redhat.com>
> ---
> gtk/spice-channel.c | 6 ++----
> 1 files changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c
> index 5e5f351..e8f0831 100644
> --- a/gtk/spice-channel.c
> +++ b/gtk/spice-channel.c
> @@ -540,8 +540,6 @@ void spice_msg_out_send(SpiceMsgOut *out)
> {
> g_return_if_fail(out != NULL);
>
> - out->header->size =
> - spice_marshaller_get_total_size(out->marshaller) - sizeof(SpiceDataHeader);
> spice_channel_send_msg(out->channel, out, TRUE);
>
> /* TODO: we currently flush/wakeup immediately all buffered messages */
> @@ -554,8 +552,6 @@ void spice_msg_out_send_internal(SpiceMsgOut *out)
> {
> g_return_if_fail(out != NULL);
>
> - out->header->size =
> - spice_marshaller_get_total_size(out->marshaller) - sizeof(SpiceDataHeader);
> spice_channel_send_msg(out->channel, out, FALSE);
> }
>
> @@ -694,6 +690,8 @@ static void spice_channel_write_msg(SpiceChannel *channel, SpiceMsgOut *out)
> g_return_if_fail(out != NULL);
> g_return_if_fail(channel == out->channel);
>
> + out->header->size =
> + spice_marshaller_get_total_size(out->marshaller) - sizeof(SpiceDataHeader);
> data = spice_marshaller_linearize(out->marshaller, 0, &len, &free_data);
> /* spice_msg_out_hexdump(out, data, len); */
> spice_channel_write(channel, data, len);
> --
> 1.7.7.4
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
--
Marc-André Lureau
More information about the Spice-devel
mailing list