summaryrefslogtreecommitdiffstats
path: root/server/main_channel.c
diff options
context:
space:
mode:
authorYonit Halperin <yhalperi@redhat.com>2012-08-05 16:57:21 +0300
committerYonit Halperin <yhalperi@redhat.com>2012-08-27 09:13:07 +0300
commitfa9bfd01f182b34ceb8ff30ae730577cd64965cc (patch)
tree8b3acc09832208500e2d34c2d341dcb4bfbc5bcc /server/main_channel.c
parent3af4b7235d23e9d0be2da780d5da9b3fcb29466f (diff)
downloadspice-fa9bfd01f182b34ceb8ff30ae730577cd64965cc.tar.gz
spice-fa9bfd01f182b34ceb8ff30ae730577cd64965cc.tar.xz
spice-fa9bfd01f182b34ceb8ff30ae730577cd64965cc.zip
main: send migration data
Also removed some unused definitions from reds that used to belong to old agent and migration code.
Diffstat (limited to 'server/main_channel.c')
-rw-r--r--server/main_channel.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index 6cdbc4dd..0c31c88e 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -496,13 +496,8 @@ static void main_channel_push_migrate_data_item(MainChannel *main_chan)
static void main_channel_marshall_migrate_data_item(RedChannelClient *rcc,
SpiceMarshaller *m, PipeItem *item)
{
- MainMigrateData *data = (MainMigrateData *)
- spice_marshaller_reserve_space(m, sizeof(MainMigrateData));
-
red_channel_client_init_send_data(rcc, SPICE_MSG_MIGRATE_DATA, item);
- reds_marshall_migrate_data_item(m, data); // TODO: from reds split. ugly separation.
- data->serial = red_channel_client_get_message_serial(rcc);
- data->ping_id = SPICE_CONTAINEROF(rcc, MainChannelClient, base)->ping_id;
+ reds_marshall_migrate_data(m); // TODO: from reds split. ugly separation.
}
static uint64_t main_channel_handle_migrate_data_get_serial(RedChannelClient *base,
@@ -996,17 +991,13 @@ static int main_channel_handle_parsed(RedChannelClient *rcc, uint32_t size, uint
#endif
break;
}
- case SPICE_MSGC_MIGRATE_FLUSH_MARK:
- break;
- case SPICE_MSGC_MIGRATE_DATA: {
- }
case SPICE_MSGC_DISCONNECTING:
break;
case SPICE_MSGC_MAIN_MIGRATE_END:
main_channel_client_handle_migrate_end(mcc);
break;
default:
- spice_printerr("unexpected type %d", type);
+ return red_channel_client_handle_message(rcc, size, type, message);
}
return TRUE;
}
@@ -1046,6 +1037,7 @@ static void main_channel_hold_pipe_item(RedChannelClient *rcc, PipeItem *item)
static int main_channel_handle_migrate_flush_mark(RedChannelClient *rcc)
{
+ spice_debug(NULL);
main_channel_push_migrate_data_item(SPICE_CONTAINEROF(rcc->channel,
MainChannel, base));
return TRUE;