mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-05 06:00:43 +00:00
test-channel: Use correct endianness for ack message
Network fields should be encoded as little endian. This was discovered using an emulated MIPS machine. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
07c7e236fc
commit
ddf3b836bb
@ -189,9 +189,9 @@ static void send_ack_sync(int socket, uint32_t generation)
|
||||
uint32_t generation;
|
||||
} msg;
|
||||
SPICE_VERIFY(sizeof(msg) == 12);
|
||||
msg.type = SPICE_MSGC_ACK_SYNC;
|
||||
msg.len = sizeof(generation);
|
||||
msg.generation = generation;
|
||||
msg.type = GUINT16_TO_LE(SPICE_MSGC_ACK_SYNC);
|
||||
msg.len = GUINT32_TO_LE(sizeof(generation));
|
||||
msg.generation = GUINT32_TO_LE(generation);
|
||||
|
||||
g_assert_cmpint(write(socket, &msg.type, 10), ==, 10);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user