summaryrefslogtreecommitdiffstats
path: root/server/red_client_shared_cache.h
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-04-02 12:54:52 +0300
committerAlon Levy <alevy@redhat.com>2011-08-23 17:44:54 +0300
commit09ae4700d27b7c1cca64c2ce4c90f0c6cdf81ccf (patch)
treecca9910321cdfe30c4302ba6929e2f7cfa206fae /server/red_client_shared_cache.h
parentb6cf68604f2d184367d0f89834ebcce88e00bad8 (diff)
downloadspice-09ae4700d27b7c1cca64c2ce4c90f0c6cdf81ccf.tar.gz
spice-09ae4700d27b7c1cca64c2ce4c90f0c6cdf81ccf.tar.xz
spice-09ae4700d27b7c1cca64c2ce4c90f0c6cdf81ccf.zip
server: move pipe from RedChannel to RedChannelClient
Another cleanup patch, no change to behavior (still one client, and it disconnects previous client if any). The implementation for multiple client is straightforward: the pipe remains per (channel,client) pair, so it needs to move from the RedChannel that to RedChannelClient. Implementation using a single pipe with multiple consumers (to reflect different latencies) doesn't fit well with pipe rewriting that is used by the display channel. Additionally this approach is much simpler to verify. Lastly it doesn't add considerable overhead (but see the display channel changes in a later patch for a real place to rethink). This patch is just technical, changing signatures to reflect the first argument (oop style) so red_channel becomes red_channel_client. Some places may seem odd but they should be fixed with later comits where the channels grow to support multiple clients. Sound (playback/record) channels are the only ones not touched - this is consistent with previous patches, since they have been left out of the RedChannel refactoring. That is left as future work. (note that they don't use a pipe, which was the reason for not refactoring).
Diffstat (limited to 'server/red_client_shared_cache.h')
-rw-r--r--server/red_client_shared_cache.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/server/red_client_shared_cache.h b/server/red_client_shared_cache.h
index dddccc62..6b1f975a 100644
--- a/server/red_client_shared_cache.h
+++ b/server/red_client_shared_cache.h
@@ -97,7 +97,7 @@ static int FUNC_NAME(add)(CACHE *cache, uint64_t id, uint32_t size, int lossy, R
if (cache->generation != channel->CACH_GENERATION) {
if (!channel->pending_pixmaps_sync) {
- red_channel_pipe_add_type((RedChannel *)channel, PIPE_ITEM_TYPE_PIXMAP_SYNC);
+ red_channel_client_pipe_add_type(rcc, PIPE_ITEM_TYPE_PIXMAP_SYNC);
channel->pending_pixmaps_sync = TRUE;
}
pthread_mutex_unlock(&cache->lock);
@@ -235,4 +235,3 @@ static void FUNC_NAME(destroy)(CACHE *cache)
#undef VAR_NAME
#undef CHANNEL
#undef CHANNEL_FROM_RCC
-