summaryrefslogtreecommitdiffstats
path: root/server/main_channel.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-04-13 09:24:31 +0300
committerAlon Levy <alevy@redhat.com>2011-08-23 18:02:38 +0300
commit4db9f1d1a9df95e84312f142cf5a0fa233376e21 (patch)
tree9efd2d8c43a2d1ede03132e679530b2029dfda45 /server/main_channel.c
parent6a1d65737300627b77bf0c5b813028146e40159b (diff)
downloadspice-4db9f1d1a9df95e84312f142cf5a0fa233376e21.tar.gz
spice-4db9f1d1a9df95e84312f142cf5a0fa233376e21.tar.xz
spice-4db9f1d1a9df95e84312f142cf5a0fa233376e21.zip
server/red_channel: introduce client ring in RedChannel
Also adds Drawable pipes and glz rings. main_channel and red_worker had several locations that still accessed rcc directly, so they had to be touched too, but the changes are minimal. Most changes are in red_channel: drop the single client reference in RedChannel and add a ring of channels. Things missing / not done right in red_worker: * StreamAgents are in DCC - right/wrong? * GlzDict is multiplied - multiple compressions. We still are missing: * remove the disconnect calls on new connections
Diffstat (limited to 'server/main_channel.c')
-rw-r--r--server/main_channel.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index 1c801051..3337c469 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -165,15 +165,13 @@ static void main_disconnect(MainChannel *main_chan)
red_channel_destroy(&main_chan->base);
}
-#define MAIN_FOREACH(_link, _main, _mcc) \
- if ((_main) && ((_mcc) = \
- SPICE_CONTAINEROF((_main)->base.rcc, MainChannelClient, base)))
-
RedClient *main_channel_get_client_by_link_id(MainChannel *main_chan, uint32_t connection_id)
{
+ RingItem *link;
MainChannelClient *mcc;
- MAIN_FOREACH(link, main_chan, mcc) {
+ RING_FOREACH(link, &main_chan->base.clients) {
+ mcc = SPICE_CONTAINEROF(link, MainChannelClient, base.channel_link);
if (mcc->connection_id == connection_id) {
return mcc->base.client;
}