[Spice-commits] 2 commits - server/red-dispatcher.c server/sound.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Thu Dec 10 11:13:06 PST 2015


 server/red-dispatcher.c |   11 +++--------
 server/sound.c          |    4 ++--
 2 files changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 17029eff1d47b3d0ebe3d2da3a267f8f79c4b597
Author: Marc-Andre Lureau <marcandre.lureau at gmail.com>
Date:   Thu Dec 10 01:04:29 2015 +0100

    red-dispatcher: group cases
    
    A small cleanup.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/red-dispatcher.c b/server/red-dispatcher.c
index 47c8179..0810798 100644
--- a/server/red-dispatcher.c
+++ b/server/red-dispatcher.c
@@ -971,10 +971,11 @@ void red_dispatcher_async_complete(struct RedDispatcher *dispatcher,
     pthread_mutex_unlock(&dispatcher->async_lock);
     switch (async_command->message) {
     case RED_WORKER_MESSAGE_UPDATE_ASYNC:
-        break;
     case RED_WORKER_MESSAGE_ADD_MEMSLOT_ASYNC:
-        break;
     case RED_WORKER_MESSAGE_DESTROY_SURFACES_ASYNC:
+    case RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT_ASYNC:
+    case RED_WORKER_MESSAGE_FLUSH_SURFACES_ASYNC:
+    case RED_WORKER_MESSAGE_MONITORS_CONFIG_ASYNC:
         break;
     case RED_WORKER_MESSAGE_CREATE_PRIMARY_SURFACE_ASYNC:
         red_dispatcher_create_primary_surface_complete(dispatcher);
@@ -982,12 +983,6 @@ void red_dispatcher_async_complete(struct RedDispatcher *dispatcher,
     case RED_WORKER_MESSAGE_DESTROY_PRIMARY_SURFACE_ASYNC:
         red_dispatcher_destroy_primary_surface_complete(dispatcher);
         break;
-    case RED_WORKER_MESSAGE_DESTROY_SURFACE_WAIT_ASYNC:
-        break;
-    case RED_WORKER_MESSAGE_FLUSH_SURFACES_ASYNC:
-        break;
-    case RED_WORKER_MESSAGE_MONITORS_CONFIG_ASYNC:
-        break;
     default:
         spice_warning("unexpected message %d", async_command->message);
     }
commit 00357bb2f381b0ad99da8e45cb5cc19c511960a1
Author: Marc-André Lureau <mlureau at redhat.com>
Date:   Thu Dec 10 01:04:23 2015 +0100

    snd: simplify reds_register_channel() call
    
    Give channel argument directly
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/sound.c b/server/sound.c
index 0c94964..df413d9 100644
--- a/server/sound.c
+++ b/server/sound.c
@@ -1534,7 +1534,7 @@ void snd_attach_playback(SpicePlaybackInstance *sin)
 
     playback_worker->base_channel = channel;
     add_worker(playback_worker);
-    reds_register_channel(playback_worker->base_channel);
+    reds_register_channel(channel);
 }
 
 void snd_attach_record(SpiceRecordInstance *sin)
@@ -1563,7 +1563,7 @@ void snd_attach_record(SpiceRecordInstance *sin)
 
     record_worker->base_channel = channel;
     add_worker(record_worker);
-    reds_register_channel(record_worker->base_channel);
+    reds_register_channel(channel);
 }
 
 static void snd_detach_common(SndWorker *worker)


More information about the Spice-commits mailing list