mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-09 05:51:00 +00:00
dcc: avoid to report errors triggered by client
Client can always send report even if a stream is not available. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
d3b5d2c97e
commit
1b6af4779a
10
server/dcc.c
10
server/dcc.c
@ -1314,9 +1314,15 @@ static int dcc_handle_stream_report(DisplayChannelClient *dcc,
|
||||
{
|
||||
StreamAgent *agent;
|
||||
|
||||
spice_return_val_if_fail(report->stream_id < NUM_STREAMS, FALSE);
|
||||
if (report->stream_id >= NUM_STREAMS) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
agent = &dcc->stream_agents[report->stream_id];
|
||||
spice_return_val_if_fail(agent->mjpeg_encoder, TRUE);
|
||||
if (!agent->mjpeg_encoder) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
spice_return_val_if_fail(report->unique_id == agent->report_id, TRUE);
|
||||
|
||||
mjpeg_encoder_client_stream_report(agent->mjpeg_encoder,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user