On Wed, Aug 08, 2012 at 08:45:06AM +0200, Gerd Hoffmann wrote: > Hi, > > > header.magic = SPICE_MAGIC; > > header.size = sizeof(ack); > > - header.major_version = SPICE_VERSION_MAJOR; > > - header.minor_version = SPICE_VERSION_MINOR; > > + header.major_version = htole32(SPICE_VERSION_MAJOR); > > + header.minor_version = htole32(SPICE_VERSION_MINOR); > > Why you don't swap magic & size too? > > > + header.size += (channel_caps->num_common_caps + channel_caps->num_caps) * sizeof(uint32_t); > > > + header.size = htole32(header.size); > > Ah, this explains it for the size. Imo things would be more readable with a header_size local variable which accumulates the size in native endian, and then we'd have header.size = htole32(header_size) Christophe
Attachment:
pgpWS35N5jzxQ.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel