mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-03 15:58:43 +00:00
server/reds: fix reds_main_channel_connected
instead of checking just for reds->main_channel check that there is at least one client as well.
This commit is contained in:
parent
0410cccde3
commit
f15cac7d7d
@ -155,6 +155,11 @@ enum NetTestStage {
|
||||
NET_TEST_STAGE_RATE,
|
||||
};
|
||||
|
||||
int main_channel_is_connected(MainChannel *main_chan)
|
||||
{
|
||||
return red_channel_is_connected(&main_chan->base);
|
||||
}
|
||||
|
||||
// when disconnection occurs, let reds shutdown all channels. This will trigger the
|
||||
// real disconnection of main channel
|
||||
static void main_channel_client_on_disconnect(RedChannelClient *rcc)
|
||||
|
||||
@ -80,6 +80,7 @@ uint32_t main_channel_client_get_link_id(MainChannelClient *mcc);
|
||||
|
||||
int main_channel_client_is_low_bandwidth(MainChannelClient *mcc);
|
||||
uint64_t main_channel_client_get_bitrate_per_sec(MainChannelClient *mcc);
|
||||
int main_channel_is_connected(MainChannel *main_chan);
|
||||
|
||||
// TODO: Defines used to calculate receive buffer size, and also by reds.c
|
||||
// other options: is to make a reds_main_consts.h, to duplicate defines.
|
||||
|
||||
@ -601,7 +601,7 @@ static void reds_reset_vdp()
|
||||
|
||||
static int reds_main_channel_connected(void)
|
||||
{
|
||||
return !!reds->main_channel;
|
||||
return main_channel_is_connected(reds->main_channel);
|
||||
}
|
||||
|
||||
void reds_client_disconnect(RedClient *client)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user