summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-10-03 21:01:38 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2014-02-13 17:38:02 +0100
commit5fa16f35366b3a0d937ed48708a7987e4284e053 (patch)
tree0899a3e1c0801bad14bd82b80c68deae044e0807
parent1af3f2405ee3169a181fa5d6870ab741f7ac61e5 (diff)
misc cleanups
-rw-r--r--server/cursor-channel.c2
-rw-r--r--server/dcc-send.c8
-rw-r--r--server/red_worker.c4
-rw-r--r--server/red_worker.h2
4 files changed, 7 insertions, 9 deletions
diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index cd6513d5..20e7351a 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -412,7 +412,7 @@ static void cursor_channel_release_item(RedChannelClient *rcc, PipeItem *item, i
CursorChannel* cursor_channel_new(RedWorker *worker)
{
CursorChannel *cursor;
- RedChannel *channel = NULL;
+ CommonChannel *channel = NULL;
ChannelCbs cbs = {
.on_disconnect = cursor_channel_client_on_disconnect,
.send_item = cursor_channel_send_item,
diff --git a/server/dcc-send.c b/server/dcc-send.c
index b9a6f8e0..0530c980 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -1994,12 +1994,10 @@ static void red_marshall_image(RedChannelClient *rcc, SpiceMarshaller *m, ImageI
if (lossy_comp) {
comp_succeeded = dcc_compress_image_jpeg(dcc, &red_image, &bitmap, &comp_send_data, groupid);
+ } else if (!lz_comp) {
+ comp_succeeded = dcc_compress_image_quic(dcc, &red_image, &bitmap, &comp_send_data, groupid);
} else {
- if (!lz_comp) {
- comp_succeeded = dcc_compress_image_quic(dcc, &red_image, &bitmap, &comp_send_data, groupid);
- } else {
- comp_succeeded = dcc_compress_image_lz(dcc, &red_image, &bitmap, &comp_send_data, groupid);
- }
+ comp_succeeded = dcc_compress_image_lz(dcc, &red_image, &bitmap, &comp_send_data, groupid);
}
surface_lossy_region = &dcc->surface_client_lossy_region[item->surface_id];
diff --git a/server/red_worker.c b/server/red_worker.c
index f1ab9a8e..49bc1c63 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -815,7 +815,7 @@ CommonChannelClient *common_channel_new_client(CommonChannel *common,
}
-RedChannel *red_worker_new_channel(RedWorker *worker, int size,
+CommonChannel *red_worker_new_channel(RedWorker *worker, int size,
const char *name,
uint32_t channel_type, int migration_flags,
ChannelCbs *channel_cbs,
@@ -846,7 +846,7 @@ RedChannel *red_worker_new_channel(RedWorker *worker, int size,
common = (CommonChannel *)channel;
common->worker = worker;
- return channel;
+ return common;
}
static void guest_set_client_capabilities(RedWorker *worker)
diff --git a/server/red_worker.h b/server/red_worker.h
index 679a9782..82a7f790 100644
--- a/server/red_worker.h
+++ b/server/red_worker.h
@@ -109,7 +109,7 @@ RedMemSlotInfo* red_worker_get_memslot(RedWorker *worker);
void red_drawable_unref(RedWorker *worker, RedDrawable *red_drawable,
uint32_t group_id);
-RedChannel *red_worker_new_channel(RedWorker *worker, int size,
+CommonChannel *red_worker_new_channel(RedWorker *worker, int size,
const char *name,
uint32_t channel_type, int migration_flags,
ChannelCbs *channel_cbs,