summaryrefslogtreecommitdiffstats
path: root/spice
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-05 14:41:09 +0100
committerHans de Goede <hdegoede@redhat.com>2013-03-05 14:41:09 +0100
commitc0808ab8840664dbf6642fbb5eabb0f267577b7e (patch)
tree41d836accf0c7cbd49ccd2d3d34ec8e08790cda7 /spice
parent4fde54a2c63720af4f8560a1d7fdce1f8ad2c6bc (diff)
downloadspice-protocol-c0808ab8840664dbf6642fbb5eabb0f267577b7e.tar.gz
spice-protocol-c0808ab8840664dbf6642fbb5eabb0f267577b7e.tar.xz
spice-protocol-c0808ab8840664dbf6642fbb5eabb0f267577b7e.zip
vd_agent: Add a new VD_AGENT_CLIENT_DISCONNECTED message
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 introduces a new VD_AGENT_CLIENT_DISCONNECTED message which the server will send from the VDP_SERVER_PORT on client disconnect, on which the agent can then reset its VDP_CLIENT_PORT state. Note that no capability is added for this, since capabilities are tracked between the client and the agent only. 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>
Diffstat (limited to 'spice')
-rw-r--r--spice/vd_agent.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/spice/vd_agent.h b/spice/vd_agent.h
index a150a6f..1c4ebaf 100644
--- a/spice/vd_agent.h
+++ b/spice/vd_agent.h
@@ -72,6 +72,7 @@ enum {
VD_AGENT_FILE_XFER_START,
VD_AGENT_FILE_XFER_STATUS,
VD_AGENT_FILE_XFER_DATA,
+ VD_AGENT_CLIENT_DISCONNECTED,
VD_AGENT_END_MESSAGE,
};