[Spice-commits] 3 commits - server/cursor-channel.c server/cursor-channel.h server/red-worker.c server/stream.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Fri Mar 4 14:25:58 UTC 2016


 server/cursor-channel.c |    1 +
 server/cursor-channel.h |    2 --
 server/red-worker.c     |    6 +++---
 server/stream.c         |    4 ++--
 4 files changed, 6 insertions(+), 7 deletions(-)

New commits:
commit 994099dd3d4076110298d33f50d69f0388333b67
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Feb 25 09:09:42 2016 +0000

    fix indentation
    
    Fix indentation for spice_debug call.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/stream.c b/server/stream.c
index 59d4bde..e98ed69 100644
--- a/server/stream.c
+++ b/server/stream.c
@@ -84,8 +84,8 @@ void stream_stop(DisplayChannel *display, Stream *stream)
 
             if (stream_bit_rate > dcc->streams_max_bit_rate) {
                 spice_debug("old max-bit-rate=%.2f new=%.2f",
-                dcc->streams_max_bit_rate / 8.0 / 1024.0 / 1024.0,
-                stream_bit_rate / 8.0 / 1024.0 / 1024.0);
+                            dcc->streams_max_bit_rate / 8.0 / 1024.0 / 1024.0,
+                            stream_bit_rate / 8.0 / 1024.0 / 1024.0);
                 dcc->streams_max_bit_rate = stream_bit_rate;
             }
         }
commit 3fdc1775a6e46c101fb0a11af9c6b113b9230440
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Thu Feb 25 09:08:31 2016 +0000

    optimize handle_dev_input call
    
    Pass directly dispatcher to handle_dev_input callback.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/red-worker.c b/server/red-worker.c
index 771e1eb..002df89 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -1392,9 +1392,9 @@ static void register_callbacks(Dispatcher *dispatcher)
 
 static void handle_dev_input(int fd, int event, void *opaque)
 {
-    RedWorker *worker = opaque;
+    Dispatcher *dispatcher = opaque;
 
-    dispatcher_handle_recv_read(red_dispatcher_get_dispatcher(worker->red_dispatcher));
+    dispatcher_handle_recv_read(dispatcher);
 }
 
 typedef struct RedWorkerSource {
@@ -1511,7 +1511,7 @@ RedWorker* red_worker_new(QXLInstance *qxl, RedDispatcher *red_dispatcher)
 
     worker->dispatch_watch =
         worker->core.watch_add(&worker->core, dispatcher_get_recv_fd(dispatcher),
-                               SPICE_WATCH_EVENT_READ, handle_dev_input, worker);
+                               SPICE_WATCH_EVENT_READ, handle_dev_input, dispatcher);
     spice_assert(worker->dispatch_watch != NULL);
 
     GSource *source = g_source_new(&worker_source_funcs, sizeof(RedWorkerSource));
commit 597f30d5b7fb42a951b8b6033e8d7ea4a95cfce8
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Mon Feb 22 10:20:21 2016 +0000

    reduce header dependencies
    
    Avoid to include headers in cursor-channel.h which are only
    used by cursor-channel.c
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index 3e3c7a7..268e34f 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -22,6 +22,7 @@
 #include <glib.h>
 #include "common/generated_server_marshallers.h"
 #include "cursor-channel.h"
+#include "cache-item.h"
 
 #define CLIENT_CURSOR_CACHE_SIZE 256
 
diff --git a/server/cursor-channel.h b/server/cursor-channel.h
index 967a117..4dad4b6 100644
--- a/server/cursor-channel.h
+++ b/server/cursor-channel.h
@@ -22,8 +22,6 @@
 #include "reds.h"
 #include "red-worker.h"
 #include "red-parse-qxl.h"
-#include "cache-item.h"
-#include "stat.h"
 
 typedef struct CursorChannel CursorChannel;
 typedef struct CursorChannelClient CursorChannelClient;


More information about the Spice-commits mailing list