spice/server
Hans de Goede 89d2a68cb7 server/reds: Send the agent a CLIENT_DISCONNECTED msg on client disconnect
Client -> agent messages can spawn multiple VDIChunks. When this happens
the agent re-assembles the chunks into a complete VDAgentMessage before
processing it. The server only guarentees coherency at the chunk level,
so it is not possible for a partial chunk to get delivered to the agent.

But it is possible for some chunks of a VDAgentMessage to be delivered to
the agent followed by a client to disconnect without the rest of the
VDAgentMessage being delivered!

This will leave the agent in a wrong state, and the first messages send to it
by the next client to connect will get seen as the rest of the VDAgentMessage
from the previous client.

This patch sends the agent a new VD_AGENT_CLIENT_DISCONNECTED message from the
VDP_SERVER_PORT, on which the agent can then reset its VDP_CLIENT_PORT state.

Note that no capability check is done for this, since the capabilities are
something negotiated between client and agent. The server will simply always
send this message on client disconnect, relying on older agents discarding the
message since it has an unknown type (which both the windows and linux agents
already do).

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2013-03-07 11:52:23 +01:00
..
tests Revert "server: add websockets support via libwebsockets" 2012-11-04 13:48:42 +02:00
.gitignore gitignore: add generated_*, vim temps, pyc 2010-11-08 16:06:55 +02:00
agent-msg-filter.c server: Filter VD_AGENT_MONITORS_CONFIG 2012-09-13 14:47:32 +03:00
agent-msg-filter.h server: Filter VD_AGENT_MONITORS_CONFIG 2012-09-13 14:47:32 +03:00
char_device.c char_device: Add spice_char_device_write_buffer_get_server_no_token() 2013-03-07 11:52:23 +01:00
char_device.h char_device: Add spice_char_device_write_buffer_get_server_no_token() 2013-03-07 11:52:23 +01:00
demarshallers.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
dispatcher.c Don't do arithmetic on void * type, use uint8_t instead 2012-04-25 09:40:18 +01:00
dispatcher.h server/dispatcher: add dispatcher_register_async_done_callback 2011-11-08 16:22:21 +02:00
glz_encode_match_tmpl.c add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
glz_encode_tmpl.c Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
glz_encoder_config.h Fix multiple printf format problems 2012-04-25 09:42:11 +01:00
glz_encoder_dictionary_protected.h server: s/max_encdoers/max_encoders/ 2012-08-30 17:08:09 +03:00
glz_encoder_dictionary.c server: s/max_encdoers/max_encoders/ 2012-08-30 17:08:09 +03:00
glz_encoder_dictionary.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
glz_encoder.c Remove trailing blank lines 2012-01-13 18:11:59 +02:00
glz_encoder.h Use the spice-common submodule 2012-03-25 18:59:10 +02:00
inputs_channel.c inputs_channel: Fix wrong handling of key up/down on big endian 2012-10-18 17:44:23 +02:00
inputs_channel.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
jpeg_encoder.c Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
jpeg_encoder.h Remove trailing whitespace from end of lines 2012-01-13 18:11:59 +02:00
main_channel.c enable seamless migration and set migration protocol version 2012-08-27 09:13:14 +03:00
main_channel.h main: restore state from migration data 2012-08-27 09:13:08 +03:00
main_dispatcher.c seamless migration: migration completion on the destination side 2012-08-27 09:13:00 +03:00
main_dispatcher.h seamless migration: migration completion on the destination side 2012-08-27 09:13:00 +03:00
Makefile.am link libspice server with libm libpthread 2013-01-14 18:54:22 +02:00
migration_protocol.h enable seamless migration and set migration protocol version 2012-08-27 09:13:14 +03:00
mjpeg_encoder.c server/mjpeg_encoder: realloc encoder->row, when a wider frame is given 2012-05-16 08:55:11 +03:00
mjpeg_encoder.h server/mjpeg_encoder: Fix memory leak for the inital output buffer given for each frame 2012-05-10 14:01:04 +03:00
red_bitmap_utils.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
red_channel.c server: freezed->froze, missing whitespace after declarations 2012-08-30 17:08:09 +03:00
red_channel.h red_channel: remove unused migrate flag from RedChannel 2012-08-27 09:13:12 +03:00
red_client_cache.h Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
red_client_shared_cache.h Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
red_common.h server/red_parse_qxl: add bitmap consistency check 2012-09-03 19:27:22 +03:00
red_dispatcher.c server: red_dispatcher: check major/minor of qxl for client_monitors_config 2012-10-24 12:10:27 +02:00
red_dispatcher.h server/red_dispatcher: client_monitors_config support 2012-09-13 14:47:31 +03:00
red_memslots.c Add support for QXLComposite to spice server 2012-08-24 13:44:42 -04:00
red_memslots.h server: allow failure in getvirt 2012-04-05 18:28:49 +03:00
red_parse_qxl.c red_parse_qxl: fix throwing away drawables that have masks 2012-12-20 10:13:09 -05:00
red_parse_qxl.h Add support for QXLComposite to spice server 2012-08-24 13:44:42 -04:00
red_tunnel_worker.c server/red_tunnel_worker: remove unneeded expect_migrate_mark 2012-08-30 17:08:09 +03:00
red_tunnel_worker.h server: Unset executable bit of red_tunnel_worker.h 2011-05-05 20:04:49 +03:00
red_worker.c worker_update_monitors_config: Drop bogus real_count accounting 2013-01-15 14:30:59 +01:00
red_worker.h server: add monitors_config support 2012-07-22 13:50:49 +03:00
reds_gl_canvas.c Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds_gl_canvas.h Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds_sw_canvas.c Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds_sw_canvas.h Use the spice-common submodule 2012-03-25 18:59:10 +02:00
reds-private.h Revert "server: add websockets support via libwebsockets" 2012-11-04 13:48:42 +02:00
reds.c server/reds: Send the agent a CLIENT_DISCONNECTED msg on client disconnect 2013-03-07 11:52:23 +01:00
reds.h Revert "server: add websockets support via libwebsockets" 2012-11-04 13:48:42 +02:00
smartcard.c smartcard.c: avoid marshalling migration data with reference to a memory that might be released before send has completed 2012-11-26 11:08:10 -05:00
smartcard.h smartcard: use SpiceCharDeviceState for managing reading from the device 2012-07-03 14:13:42 +03:00
snd_worker.c snd channel: fix accessing freed memory 2012-10-11 20:23:47 +02:00
snd_worker.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
spice-experimental.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
spice-server.syms server: add "port" channel support 2012-12-05 11:46:28 +01:00
spice.h server: add "port" channel support 2012-12-05 11:46:28 +01:00
spicevmc.c server: add "port" channel support 2012-12-05 11:46:28 +01:00
stat.h Remove trailing blank lines 2012-01-13 18:11:59 +02:00
zlib_encoder.c Use the spice-common logging functions 2012-03-25 19:00:00 +02:00
zlib_encoder.h applying zlib compression over glz on WAN connection 2010-06-21 15:05:37 +02:00