spicevmc: Fix assert when still connected on session disconnect (fdo#43903)
spicevmc: Fix assert when still connected on session disconnect (fdo#43903)

Currently when the main channel disconnects while a spicevmc channel
(such as a usbredir channel) is still connected, qemu will abort with the
following message:
ring_remove: ASSERT item->next != NULL && item->prev != NULL failed

This is caused by red_client_destroy() first calling:
rcc->channel->client_cbs.disconnect(rcc);
And then calling:
red_channel_client_destroy(rcc);

For each channel. This is fine, but the spicevmc disconnect code does a
red_channel_client_destroy(rcc) itself since as usb devices are added
/ removed, the channels carrying their traffic get connected / disconnected
and they get re-used for new devices, which won't work if the old channel is
still there when the new connection comes in.

This patch fixes the double destroy when there are still spicevmc channels
connected by not doing the red_channel_client_destroy from the spicevmc
disconnect code when not just the channel, but the entire client is
disconnecting.

Signed-off-by: Hans de Goede <9fa1be1a5b5729e4c6b404f34c9ce49ff4882fd8@redhat.com>

dezelin/spice,mathslinux/spice,alon/spice-server,elmarco/spice,Fantu/spice,mathslinux/spice,freedesktop-unofficial-mirror/spice__spice,alon/spice-server,elmarco/spice,alon/spice-server,mathslinux/spice,freedesktop-unofficial-mirror/spice__spice,fgouget/spice,alon/spice-server,freedesktop-unofficial-mirror/spice__spice,Fantu/spice,mathslinux/spice,ya-mouse/spice,elmarco/spice,Fantu/spice,fgouget/spice,alon/spice-server,SPICE/spice,elmarco/spice,SPICE/spice,fgouget/spice,mathslinux/spice,elmarco/spice,SPICE/spice,dezelin/spice,Fantu/spice,dezelin/spice,fgouget/spice,freedesktop-unofficial-mirror/spice__spice,ya-mouse/spice,freedesktop-unofficial-mirror/spice__spice,ya-mouse/spice,dezelin/spice,dezelin/spice