mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-gtk
synced 2026-01-05 12:13:15 +00:00
main: migration: check return value to count channels
Although spice_channel_connect() works in idle, if it returns false it'll not emit any signal further and we would be counting a 'connected' channel that wouldn't be emitting anything. As other callbacks take this in consideration, we should only increment the counter if we reached spice-channel::connect_delayed() callback. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
parent
6538d15b59
commit
d77b2db80c
@ -2174,8 +2174,9 @@ migrate_channel_connect(spice_migrate *mig, int type, int id)
|
||||
SPICE_DEBUG("migrate_channel_connect %d:%d", type, id);
|
||||
|
||||
SpiceChannel *newc = spice_channel_new(mig->session, type, id);
|
||||
spice_channel_connect(newc);
|
||||
mig->nchannels++;
|
||||
if (newc != NULL && spice_channel_connect(newc)) {
|
||||
mig->nchannels++;
|
||||
}
|
||||
}
|
||||
|
||||
/* coroutine context */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user