mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-28 16:29:56 +00:00
server: fix not calling migrate_connect completion callback
When the server is a migration target and spice_server_migrate_connect is called before SPICE_MSGC_MIGRATE_END has been received, we start the mig_timer. We handle the migrate_connect only when receiving SPICE_MSGC_MIGRATE_END. If the mig_timer expires before that, we dismiss the request, and should call the migrate_connect completion callback. Since reds->mig_inprogress wasn't set appropriately, it wasn't called.
This commit is contained in:
parent
524fcb3aa4
commit
f29dc9b620
@ -4205,22 +4205,20 @@ static void reds_mig_started(void)
|
||||
|
||||
reds->expect_migrate = TRUE;
|
||||
if (reds->client_semi_mig_cap) {
|
||||
reds->mig_inprogress = TRUE;
|
||||
if (reds->mig_target) {
|
||||
red_printf("previous spice migration hasn't completed yet. Waiting for client");
|
||||
reds->mig_wait_prev_complete = TRUE;
|
||||
core->timer_start(reds->mig_timer, MIGRATE_TIMEOUT);
|
||||
return;
|
||||
} else {
|
||||
reds_mig_connect();
|
||||
}
|
||||
} else if (sif) {
|
||||
// switch host msg will be sent after migration completes
|
||||
sif->migrate_connect_complete(migration_interface);
|
||||
return;
|
||||
} else {
|
||||
if (sif) {
|
||||
// switch host msg will be sent after migration completes
|
||||
sif->migrate_connect_complete(migration_interface);
|
||||
}
|
||||
}
|
||||
|
||||
reds->mig_inprogress = TRUE;
|
||||
|
||||
reds_mig_connect();
|
||||
return;
|
||||
}
|
||||
|
||||
static void reds_mig_finished(int completed)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user