On Fri, Dec 22, 2017 at 10:07:11AM +0000, Frediano Ziglio wrote:
> All SPICE protocol is little endian, there's no agreement on other
> endian and currently we support only little endian so make sure
> this will work even possibly running on a big endian machine.
> 
> Signed-off-by: Frediano Ziglio <fzig...@redhat.com>
> ---
>  server/red-stream.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/server/red-stream.c b/server/red-stream.c
> index a0423228f..83afd2b45 100644
> --- a/server/red-stream.c
> +++ b/server/red-stream.c
> @@ -582,6 +582,7 @@ static bool red_stream_write_u8(RedStream *s, uint8_t n)
>  
>  static bool red_stream_write_u32(RedStream *s, uint32_t n)
>  {
> +    n = GUINT32_TO_LE(n);

If you do that change, I would rename the method to
red_stream_write_u32_le()

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to