summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-07-06 16:26:01 +0200
committerAlon Levy <alevy@redhat.com>2011-07-21 15:09:29 +0300
commitc44878ff8d7c2af53c243579c930211ab34c3e42 (patch)
tree6cb237b65bffba5152bbed4723877ac69eb0e880 /server
parent0e5452b0ba2e743a67d700744092b2cd48f36615 (diff)
downloadspice-c44878ff8d7c2af53c243579c930211ab34c3e42.tar.gz
spice-c44878ff8d7c2af53c243579c930211ab34c3e42.tar.xz
spice-c44878ff8d7c2af53c243579c930211ab34c3e42.zip
client: don't crash when agent is missing WAN support
If you try to connect to a linux guest with WAN options, SPICE window opens up and is blank - it then fails with vdagent timeout message. It should give a warning that this is only applicable for windows guest and still connect to guest. It all starts in RedClient::handle_init This function checks whether we have an agent or not, because if we have an agent, there will be some kind of handshake to check both sides capabilities before all the spice channels are created. When there is no agent running, the startup process goes on with SPICE_MSGC_MAIN_ATTACH_CHANNELS When there is a windows agent running, VD_AGENT_ANNOUNCE_CAPABILITIES and VD_AGENT_DISPLAY_CONFIG messages are sent to the agent, and when processing the agent answer to the VD_AGENT_DISPLAY_CONFIG message, SPICE_MSGC_MAIN_ATTACH_CHANNELS will be sent and the startup process will go on. However, when there is no agent running but --color-depth was used, handle_init won't send the SPICE_MSGC_MAIN_ATTACH_CHANNELS message but will wait for the agent handshake to proceed to its end, which won't happen, so it will timeout waiting for agent answers. Similarly, the linux agent handles VD_AGENT_ANNOUNCE_CAPABILITIES messages, but it doesn't handle VD_AGENT_DISPLAY_CONFIG messages, so we'll never reach the point where a SPICE_MSGC_MAIN_ATTACH_CHANNELS will be sent. This commit fixes this in 2 places: - unconditionnally send SPICE_MSGC_ATTACH_CHANNELS when no agent is running in handle_init - send SPICE_MSGC_MAIN_ATTACH_CHANNELS in RedClient::on_agent_announce_capabilities if the agent doesn't have the VD_AGENT_CAP_DISPLAY_CONFIG capability This fixes RH bug #712938
Diffstat (limited to 'server')
0 files changed, 0 insertions, 0 deletions