[gtk+/gtk-3-8] broadway: Fix assert failure



commit 824a7c35f17ba1670cf6eb06a96897e82898b90d
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Mar 18 16:37:25 2013 +0100

    broadway: Fix assert failure
    
    Requests are not limited in size by BroadwayRequest, as
    BroadwayRequestTranslation can be of variable size. No need
    to copy the request anymore though, because requests are aligned
    now.

 gdk/broadway/broadwayd.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gdk/broadway/broadwayd.c b/gdk/broadway/broadwayd.c
index 9a273c7..1c06eb7 100644
--- a/gdk/broadway/broadwayd.c
+++ b/gdk/broadway/broadwayd.c
@@ -409,7 +409,6 @@ client_fill_cb (GObject *source_object,
       guint32 size;
       gsize count, remaining;
       guint8 *buffer;
-      BroadwayRequest request;
 
       buffer = (guint8 *)g_buffered_input_stream_peek_buffer (client->in, &count);
 
@@ -417,14 +416,10 @@ client_fill_cb (GObject *source_object,
       while (remaining >= sizeof (guint32))
        {
          memcpy (&size, buffer, sizeof (guint32));
-         
+
          if (size <= remaining)
            {
-             g_assert (size >= sizeof (BroadwayRequestBase));
-             g_assert (size <= sizeof (BroadwayRequest));
-
-             memcpy (&request, buffer, size);
-             client_handle_request (client, &request);
+             client_handle_request (client, (BroadwayRequest *)buffer);
 
              remaining -= size;
              buffer += size;


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