Blame SOURCES/0022-reds-lookup-corresponding-channel-id.patch

e2c81d
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
fce154
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@gmail.com>
fce154
Date: Mon, 18 Nov 2013 11:28:25 +0100
fce154
Subject: [PATCH] reds: lookup corresponding channel id
fce154
fce154
In reds_send_link_ack(), lookup the channel with the same id as the link
fce154
message.
fce154
fce154
The bug was found during code review a while ago.
fce154
fce154
A reproducer bug was later reported:
fce154
https://bugzilla.redhat.com/show_bug.cgi?id=1058625
fce154
fce154
(cherry picked from commit a434543eb1243db1e52ca6a4e0cdfb425c277e56)
fce154
---
fce154
 server/reds.c | 3 ++-
fce154
 1 file changed, 2 insertions(+), 1 deletion(-)
fce154
fce154
diff --git a/server/reds.c b/server/reds.c
fce154
index 7b7f262..464552a 100644
fce154
--- a/server/reds.c
fce154
+++ b/server/reds.c
fce154
@@ -1459,7 +1459,8 @@ static int reds_send_link_ack(RedLinkInfo *link)
fce154
 
fce154
     ack.error = SPICE_LINK_ERR_OK;
fce154
 
fce154
-    channel = reds_find_channel(link->link_mess->channel_type, 0);
fce154
+    channel = reds_find_channel(link->link_mess->channel_type,
fce154
+                                link->link_mess->channel_id);
fce154
     if (!channel) {
fce154
         spice_assert(link->link_mess->channel_type == SPICE_CHANNEL_MAIN);
fce154
         spice_assert(reds->main_channel);