[Spice-commits] server/dcc.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Mon Jan 11 06:45:44 PST 2016
server/dcc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 1b6af4779a3e4063ff0aad7c0a56302eccdc3e08
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Dec 22 16:42:44 2015 +0000
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 at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/dcc.c b/server/dcc.c
index c23936a..eb5e4d1 100644
--- a/server/dcc.c
+++ b/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,
More information about the Spice-commits
mailing list