[Spice-devel] [PATCH 3/5] zap dead qxl chunk code

Gerd Hoffmann kraxel at redhat.com
Thu Aug 26 15:09:22 PDT 2010


Signed-off-by: Gerd Hoffmann <kraxel at redhat.com>
---
 server/red_worker.c |   29 -----------------------------
 1 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index f525f17..17bbf6f 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -222,7 +222,6 @@ struct EventListener {
 
 enum {
     BUF_TYPE_RAW = 1,
-    BUF_TYPE_CHUNK,
 };
 
 typedef struct BufDescriptor {
@@ -4517,41 +4516,13 @@ static void marshaller_add_compressed(RedWorker *worker, SpiceMarshaller *m,
 }
 
 
-static void marshaller_add_chunk(RedWorker *worker, SpiceMarshaller *m, QXLDataChunk *chunk, size_t size,
-                                 int memslot_id, uint32_t group_id)
-{
-    while (chunk != NULL && size > 0) {
-        int data_size = chunk->data_size;
-
-        if (data_size > size)
-            data_size = size;
-        size -= data_size;
-
-        if (data_size) {
-            validate_virt(&worker->mem_slots, (unsigned long)chunk->data, memslot_id, data_size, group_id);
-            spice_marshaller_add_ref(m, (uint8_t *)chunk->data, data_size);
-        }
-        chunk = chunk->next_chunk ?
-            (QXLDataChunk *)get_virt(&worker->mem_slots, chunk->next_chunk, sizeof(QXLDataChunk),
-                                     group_id) :
-            NULL;
-    }
-}
-
 static void add_buf_from_info(RedChannel *channel, SpiceMarshaller *m, AddBufInfo *info)
 {
-    QXLDataChunk *chunk;
-
     if (info->data) {
         switch (info->type) {
         case BUF_TYPE_RAW:
             spice_marshaller_add_ref(m, info->data, info->size);
             break;
-        case BUF_TYPE_CHUNK:
-            chunk = (QXLDataChunk *)info->data;
-            marshaller_add_chunk(channel->worker, m, chunk,
-                                 info->size, info->slot_id, info->group_id);
-            break;
         }
     }
 }
-- 
1.7.1



More information about the Spice-devel mailing list