summaryrefslogtreecommitdiffstats
path: root/server/reds.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2013-11-18 11:28:25 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2014-09-08 14:48:08 +0200
commita434543eb1243db1e52ca6a4e0cdfb425c277e56 (patch)
treea45658c9210a1ee172311122dafaca844b67405c /server/reds.c
parent5972452b287a7b1831411595896e69db2ea991ac (diff)
downloadspice-a434543eb1243db1e52ca6a4e0cdfb425c277e56.tar.gz
spice-a434543eb1243db1e52ca6a4e0cdfb425c277e56.tar.xz
spice-a434543eb1243db1e52ca6a4e0cdfb425c277e56.zip
reds: lookup corresponding channel id
In reds_send_link_ack(), lookup the channel with the same id as the link message. The bug was found during code review a while ago. A reproducer bug was later reported: https://bugzilla.redhat.com/show_bug.cgi?id=1058625
Diffstat (limited to 'server/reds.c')
-rw-r--r--server/reds.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/reds.c b/server/reds.c
index 2c437ac5..605b023e 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1342,7 +1342,8 @@ static int reds_send_link_ack(RedLinkInfo *link)
ack.error = SPICE_LINK_ERR_OK;
- channel = reds_find_channel(link->link_mess->channel_type, 0);
+ channel = reds_find_channel(link->link_mess->channel_type,
+ link->link_mess->channel_id);
if (!channel) {
spice_assert(link->link_mess->channel_type == SPICE_CHANNEL_MAIN);
spice_assert(reds->main_channel);