summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-08-06 13:35:19 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-08-27 09:13:12 +0300
commit26027036c05cac96e2648ee146d63ba83af2d35e (patch)
treeb3773c51bfebf9661d9c6d3604565b9ef5ff7904
parent934fb14ccc731689369c55ead8125a590c0c4343 (diff)
downloadspice-26027036c05cac96e2648ee146d63ba83af2d35e.tar.gz
spice-26027036c05cac96e2648ee146d63ba83af2d35e.tar.xz
spice-26027036c05cac96e2648ee146d63ba83af2d35e.zip
red_channel: remove unused migrate flag from RedChannel
The relevant flags reside in RedChannelClient and RedClient
-rw-r--r--server/inputs_channel.c1
-rw-r--r--server/main_channel.c2
-rw-r--r--server/red_channel.c7
-rw-r--r--server/red_channel.h5
-rw-r--r--server/red_worker.c7
-rw-r--r--server/smartcard.c1
-rw-r--r--server/snd_worker.c10
-rw-r--r--server/spicevmc.c1
8 files changed, 12 insertions, 22 deletions
diff --git a/server/inputs_channel.c b/server/inputs_channel.c
index d753bacf..684dec61 100644
--- a/server/inputs_channel.c
+++ b/server/inputs_channel.c
@@ -539,7 +539,6 @@ void inputs_init(void)
sizeof(InputsChannel),
core,
SPICE_CHANNEL_INPUTS, 0,
- FALSE, // TODO: set migration?
FALSE, /* handle_acks */
spice_get_client_channel_parser(SPICE_CHANNEL_INPUTS, NULL),
inputs_channel_handle_parsed,
diff --git a/server/main_channel.c b/server/main_channel.c
index 1df19df9..70941817 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -1172,7 +1172,7 @@ MainChannel* main_channel_init(void)
// TODO: set the migration flag of the channel
channel = red_channel_create_parser(sizeof(MainChannel), core,
SPICE_CHANNEL_MAIN, 0,
- FALSE, FALSE, /* handle_acks */
+ FALSE, /* handle_acks */
spice_get_client_channel_parser(SPICE_CHANNEL_MAIN, NULL),
main_channel_handle_parsed,
&channel_cbs,
diff --git a/server/red_channel.c b/server/red_channel.c
index 18b69d32..97a26d12 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -768,7 +768,7 @@ void red_channel_client_default_migrate(RedChannelClient *rcc)
RedChannel *red_channel_create(int size,
SpiceCoreInterface *core,
uint32_t type, uint32_t id,
- int migrate, int handle_acks,
+ int handle_acks,
channel_handle_message_proc handle_message,
ChannelCbs *channel_cbs,
uint32_t migration_flags)
@@ -790,7 +790,6 @@ RedChannel *red_channel_create(int size,
memcpy(&channel->channel_cbs, channel_cbs, sizeof(ChannelCbs));
channel->core = core;
- channel->migrate = migrate;
ring_init(&channel->clients);
// TODO: send incoming_cb as parameters instead of duplicating?
@@ -879,14 +878,14 @@ static int do_nothing_handle_message(RedChannelClient *rcc,
RedChannel *red_channel_create_parser(int size,
SpiceCoreInterface *core,
uint32_t type, uint32_t id,
- int migrate, int handle_acks,
+ int handle_acks,
spice_parse_channel_func_t parser,
channel_handle_parsed_proc handle_parsed,
ChannelCbs *channel_cbs,
uint32_t migration_flags)
{
RedChannel *channel = red_channel_create(size, core, type, id,
- migrate, handle_acks,
+ handle_acks,
do_nothing_handle_message,
channel_cbs,
migration_flags);
diff --git a/server/red_channel.h b/server/red_channel.h
index aab7d2d0..0bd4cb12 100644
--- a/server/red_channel.h
+++ b/server/red_channel.h
@@ -284,7 +284,6 @@ struct RedChannel {
RingItem link; // channels link for reds
SpiceCoreInterface *core;
- int migrate;
int handle_acks;
// RedChannel will hold only connected channel clients (logic - when pushing pipe item to all channel clients, there
@@ -320,7 +319,7 @@ struct RedChannel {
RedChannel *red_channel_create(int size,
SpiceCoreInterface *core,
uint32_t type, uint32_t id,
- int migrate, int handle_acks,
+ int handle_acks,
channel_handle_message_proc handle_message,
ChannelCbs *channel_cbs,
uint32_t migration_flags);
@@ -330,7 +329,7 @@ RedChannel *red_channel_create(int size,
RedChannel *red_channel_create_parser(int size,
SpiceCoreInterface *core,
uint32_t type, uint32_t id,
- int migrate, int handle_acks,
+ int handle_acks,
spice_parse_channel_func_t parser,
channel_handle_parsed_proc handle_parsed,
ChannelCbs *channel_cbs,
diff --git a/server/red_worker.c b/server/red_worker.c
index 3b64e0c5..28fed603 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -10076,7 +10076,7 @@ CursorChannelClient *cursor_channel_create_rcc(CommonChannel *common,
return ccc;
}
-static RedChannel *__new_channel(RedWorker *worker, int size, uint32_t channel_type, int migrate,
+static RedChannel *__new_channel(RedWorker *worker, int size, uint32_t channel_type,
int migration_flags,
channel_disconnect_proc on_disconnect,
channel_send_pipe_item_proc send_item,
@@ -10104,7 +10104,6 @@ static RedChannel *__new_channel(RedWorker *worker, int size, uint32_t channel_t
channel = red_channel_create_parser(size, &worker_core,
channel_type, worker->id,
- migrate,
TRUE /* handle_acks */,
spice_get_client_channel_parser(channel_type, NULL),
handle_parsed,
@@ -10265,7 +10264,7 @@ static void display_channel_create(RedWorker *worker, int migrate)
spice_info("create display channel");
if (!(worker->display_channel = (DisplayChannel *)__new_channel(
worker, sizeof(*display_channel),
- SPICE_CHANNEL_DISPLAY, migrate,
+ SPICE_CHANNEL_DISPLAY,
SPICE_MIGRATE_NEED_FLUSH | SPICE_MIGRATE_NEED_DATA_TRANSFER,
display_channel_client_on_disconnect,
display_channel_send_item,
@@ -10470,7 +10469,7 @@ static void cursor_channel_create(RedWorker *worker, int migrate)
spice_info("create cursor channel");
worker->cursor_channel = (CursorChannel *)__new_channel(
worker, sizeof(*worker->cursor_channel),
- SPICE_CHANNEL_CURSOR, migrate,
+ SPICE_CHANNEL_CURSOR,
0,
cursor_channel_client_on_disconnect,
cursor_channel_send_item,
diff --git a/server/smartcard.c b/server/smartcard.c
index 7c3a0701..a7e81d53 100644
--- a/server/smartcard.c
+++ b/server/smartcard.c
@@ -842,7 +842,6 @@ static void smartcard_init(void)
g_smartcard_channel = (SmartCardChannel*)red_channel_create(sizeof(SmartCardChannel),
core, SPICE_CHANNEL_SMARTCARD, 0,
- FALSE /* migration - TODO?*/,
FALSE /* handle_acks */,
smartcard_channel_handle_message,
&channel_cbs,
diff --git a/server/snd_worker.c b/server/snd_worker.c
index 7c47242b..995823c4 100644
--- a/server/snd_worker.c
+++ b/server/snd_worker.c
@@ -97,7 +97,6 @@ struct SndChannel {
int blocked;
uint32_t command;
- int migrate;
uint32_t ack_generation;
uint32_t client_ack_generation;
uint32_t out_messages;
@@ -923,7 +922,6 @@ static SndChannel *__new_channel(SndWorker *worker, int size, uint32_t channel_i
goto error2;
}
- channel->migrate = migrate;
channel->send_messages = send_messages;
channel->handle_message = handle_message;
channel->on_message_done = on_message_done;
@@ -1101,7 +1099,7 @@ static void on_new_playback_channel(SndWorker *worker)
spice_assert(playback_channel);
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_MODE_MASK);
- if (!playback_channel->base.migrate && playback_channel->base.active) {
+ if (playback_channel->base.active) {
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_CTRL_MASK);
}
snd_set_command((SndChannel *)playback_channel, SND_PLAYBACK_VOLUME_MASK);
@@ -1318,10 +1316,8 @@ static void on_new_record_channel(SndWorker *worker)
spice_assert(record_channel);
snd_set_command((SndChannel *)record_channel, SND_RECORD_VOLUME_MASK);
- if (!record_channel->base.migrate) {
- if (record_channel->base.active) {
- snd_set_command((SndChannel *)record_channel, SND_RECORD_CTRL_MASK);
- }
+ if (record_channel->base.active) {
+ snd_set_command((SndChannel *)record_channel, SND_RECORD_CTRL_MASK);
}
}
diff --git a/server/spicevmc.c b/server/spicevmc.c
index b6eaa08a..058a1820 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -417,7 +417,6 @@ SpiceCharDeviceState *spicevmc_device_connect(SpiceCharDeviceInstance *sin,
state = (SpiceVmcState*)red_channel_create(sizeof(SpiceVmcState),
core, channel_type, id[channel_type]++,
- FALSE /* migration - TODO? */,
FALSE /* handle_acks */,
spicevmc_red_channel_client_handle_message,
&channel_cbs,