diff options
author | Alon Levy <alevy@redhat.com> | 2011-04-11 22:29:58 +0300 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-08-23 17:59:09 +0300 |
commit | 9cece23ba3e49e6eec9e380daa95d6ee0133c91c (patch) | |
tree | d1f423994d4d33d3af4581c00bd33a3e5eb53f54 /server/reds.c | |
parent | 0f0bdb190b8586ef7ac20fcefffe641e44eb15b9 (diff) | |
download | spice-9cece23ba3e49e6eec9e380daa95d6ee0133c91c.tar.gz spice-9cece23ba3e49e6eec9e380daa95d6ee0133c91c.tar.xz spice-9cece23ba3e49e6eec9e380daa95d6ee0133c91c.zip |
server/main_channel: support multiple clients
The main channel deals with connecting new clients, announcing mouse mode
changes, and the agent channel. The implementation is currently done without
any changes to the protocol, so everything has to be either broadcast or
to a specific client.
channels list - specific client
mouse mode - broadcast
agent - broadcast
notify - broadcast (should have two modes, and use the appropriate)
Notable TODOs:
* migration testing
* agent tokens are wrongly sent (or did I fix that? check)
Diffstat (limited to 'server/reds.c')
-rw-r--r-- | server/reds.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/reds.c b/server/reds.c index 7cc380b3..e078594f 100644 --- a/server/reds.c +++ b/server/reds.c @@ -986,8 +986,10 @@ void reds_on_main_agent_start(void) reds->agent_state.write_filter.discard_all = FALSE; } -void reds_on_main_agent_data(void *message, size_t size) +void reds_on_main_agent_data(MainChannelClient *mcc, void *message, size_t size) { + // TODO - use mcc (and start tracking agent data per channel. probably just move the whole + // tokens accounting to mainchannel. RingItem *ring_item; VDAgentExtBuf *buf; int res; @@ -1558,7 +1560,7 @@ static void reds_handle_main_link(RedLinkInfo *link) reds_get_mm_time() - MM_TIME_DELTA, red_dispatcher_qxl_ram_size()); - main_channel_start_net_test(mcc); + main_channel_client_start_net_test(mcc); /* Now that we have a client, forward any pending agent data */ while (read_from_vdi_port()); } |