[PATCH spice-gtk 2/3] spice-channel: Allows to connect from a big endian machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tested with a ppc64 machine.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 src/spice-channel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/spice-channel.c b/src/spice-channel.c
index 7e3e3b72..55ead158 100644
--- a/src/spice-channel.c
+++ b/src/spice-channel.c
@@ -1970,14 +1970,14 @@ static gboolean spice_channel_recv_link_msg(SpiceChannel *channel)
 #ifdef HAVE_SASL
         if (spice_channel_test_common_capability(channel, SPICE_COMMON_CAP_AUTH_SASL)) {
             CHANNEL_DEBUG(channel, "Choosing SASL mechanism");
-            auth.auth_mechanism = SPICE_COMMON_CAP_AUTH_SASL;
+            auth.auth_mechanism = GUINT32_TO_LE(SPICE_COMMON_CAP_AUTH_SASL);
             spice_channel_write(channel, &auth, sizeof(auth));
             if (!spice_channel_perform_auth_sasl(channel))
                 return FALSE;
         } else
 #endif
         if (spice_channel_test_common_capability(channel, SPICE_COMMON_CAP_AUTH_SPICE)) {
-            auth.auth_mechanism = SPICE_COMMON_CAP_AUTH_SPICE;
+            auth.auth_mechanism = GUINT32_TO_LE(SPICE_COMMON_CAP_AUTH_SPICE);
             spice_channel_write(channel, &auth, sizeof(auth));
             if ((event = spice_channel_send_spice_ticket(channel)) != SPICE_CHANNEL_NONE)
                 goto error;
-- 
2.17.1

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




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]