[Spice-commits] 2 commits - server/red-replay-qxl.c server/tests

Frediano Ziglio fziglio at kemper.freedesktop.org
Thu Nov 10 06:38:53 UTC 2016


 server/red-replay-qxl.c |    4 ++--
 server/tests/replay.c   |    4 ----
 2 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit d0f4910c1d50b9ce77ef5ee1a2350ca58fd7695a
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Fri Nov 4 12:41:10 2016 +0000

    replay: Check properly version number
    
    0 as version was never used so don't allow it
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
index c1678cd..0cd57d7 100644
--- a/server/red-replay-qxl.c
+++ b/server/red-replay-qxl.c
@@ -1416,7 +1416,7 @@ SpiceReplay *spice_replay_new(FILE *file, int nsurfaces)
     spice_return_val_if_fail(file != NULL, NULL);
 
     if (fscanf(file, "SPICE_REPLAY %u\n", &version) == 1) {
-        if (version > 1) {
+        if (version != 1) {
             spice_warning("Replay file version unsupported");
             return NULL;
         }
commit c6881ad1a00d95d0231dcab7bb30827e86d4d572
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Oct 31 06:29:35 2016 +0000

    replay: Replicate wakeups properly
    
    Instead of waking up the command loop for every command queued,
    handle saved wakeups and replicate these.
    This better reproduces what happened in the server.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Jonathon Jongsma <jjongsma at redhat.com>

diff --git a/server/red-replay-qxl.c b/server/red-replay-qxl.c
index 78de48b..c1678cd 100644
--- a/server/red-replay-qxl.c
+++ b/server/red-replay-qxl.c
@@ -1280,7 +1280,7 @@ static void replay_handle_dev_input(QXLWorker *worker, SpiceReplay *replay,
         // we want to ignore this one - it is sent on client connection, we
         // shall have our own clients
     case RED_WORKER_MESSAGE_WAKEUP:
-        // safe to ignore
+        worker->wakeup(worker);
         break;
     default:
         spice_debug("unhandled %d\n", message);
diff --git a/server/tests/replay.c b/server/tests/replay.c
index 467a344..042e1f5 100644
--- a/server/tests/replay.c
+++ b/server/tests/replay.c
@@ -112,7 +112,6 @@ static void get_init_info(QXLInstance *qin, QXLDevInitInfo *info)
 static gboolean fill_queue_idle(gpointer user_data)
 {
     gboolean keep = FALSE;
-    gboolean wakeup = FALSE;
 
     while ((g_async_queue_length(display_queue) +
             g_async_queue_length(cursor_queue)) < 50) {
@@ -129,7 +128,6 @@ static gboolean fill_queue_idle(gpointer user_data)
             g_usleep(slow);
         }
 
-        wakeup = TRUE;
         if (cmd->cmd.type == QXL_CMD_CURSOR) {
             g_async_queue_push(cursor_queue, cmd);
         } else {
@@ -147,8 +145,6 @@ end:
         }
         pthread_mutex_unlock(&mutex);
     }
-    if (wakeup)
-        spice_qxl_wakeup(&display_sin);
 
     return keep;
 }


More information about the Spice-commits mailing list