[Spice-devel] [PATCH] reds: send the number of channel in the LE byte-order

Denis Kirjanov kda at linux-powerpc.org
Thu Mar 26 07:52:05 PDT 2015


Since the spice protocol is LE send the number of channels in
the proper byte order

Signed-off-by: Denis Kirjanov <kda at linux-powerpc.org>
---
 server/reds.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index f61d5d3..468ac9c 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -37,6 +37,8 @@
 #include <ctype.h>
 #include <stdbool.h>
 
+#include <glib.h>
+
 #include <openssl/err.h>
 
 #if HAVE_SASL
@@ -874,7 +876,7 @@ void reds_fill_channels(SpiceMsgChannels *channels_info)
         used_channels++;
     }
 
-    channels_info->num_of_channels = used_channels;
+    channels_info->num_of_channels = GUINT32_TO_LE(used_channels);
     if (used_channels != reds->num_of_channels) {
         spice_warning("sent %d out of %d", used_channels, reds->num_of_channels);
     }
-- 
1.7.10.4



More information about the Spice-devel mailing list