summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathon Jongsma <jjongsma@redhat.com>2015-01-16 14:31:04 -0600
committerFabiano FidĂȘncio <fidencio@redhat.com>2015-02-23 23:00:42 +0100
commitf6df3d38e0cfaebd796e3b743ee685f185c4ff72 (patch)
treed803e54e292afdcc46fd86fd09981d6caef15dd2
parent7bdff80d82990ecfedbe99ded1fb09118a60e738 (diff)
downloadspice-f6df3d38e0cfaebd796e3b743ee685f185c4ff72.tar.gz
spice-f6df3d38e0cfaebd796e3b743ee685f185c4ff72.tar.xz
spice-f6df3d38e0cfaebd796e3b743ee685f185c4ff72.zip
Change reds_find_channel() to take RedsState arg
-rw-r--r--server/reds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/reds.c b/server/reds.c
index 5d8ddea5..269a2f30 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -338,7 +338,7 @@ void reds_unregister_channel(RedsState *reds, RedChannel *channel)
}
}
-static RedChannel *reds_find_channel(uint32_t type, uint32_t id)
+static RedChannel *reds_find_channel(RedsState *reds, uint32_t type, uint32_t id)
{
RingItem *now;
@@ -1366,7 +1366,7 @@ static int reds_send_link_ack(RedLinkInfo *link)
ack.error = SPICE_LINK_ERR_OK;
- channel = reds_find_channel(link->link_mess->channel_type,
+ channel = reds_find_channel(reds, link->link_mess->channel_type,
link->link_mess->channel_id);
if (!channel) {
spice_assert(link->link_mess->channel_type == SPICE_CHANNEL_MAIN);
@@ -1734,7 +1734,7 @@ static int reds_link_mig_target_channels(RedClient *client)
RedChannel *channel;
mig_link = SPICE_CONTAINEROF(item, RedsMigPendingLink, ring_link);
- channel = reds_find_channel(mig_link->link_msg->channel_type,
+ channel = reds_find_channel(reds, mig_link->link_msg->channel_type,
mig_link->link_msg->channel_id);
if (!channel) {
spice_warning("client %p channel (%d, %d) (type, id) wasn't found",
@@ -1815,7 +1815,7 @@ static void reds_handle_other_links(RedLinkInfo *link)
}
// TODO: MC: be less lenient. Tally connections from same connection_id (by same client).
- if (!(channel = reds_find_channel(link_mess->channel_type,
+ if (!(channel = reds_find_channel(reds, link_mess->channel_type,
link_mess->channel_id))) {
reds_send_link_result(link, SPICE_LINK_ERR_CHANNEL_NOT_AVAILABLE);
reds_link_free(link);