spice/client
Christophe Fergeau 492f7a9b84 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
2011-07-18 18:15:40 +02:00
..
gui add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
tests add .gitignore for tests 2010-11-30 20:54:49 +02:00
windows client: fix for redundant shift+f11 RHBZ #674532 2011-06-14 10:15:41 +03:00
x11 x11: don't return freed memory from get_clipboard 2011-07-18 18:15:39 +02:00
.gitignore gitignore: add generated_*, vim temps, pyc 2010-11-08 16:06:55 +02:00
application.cpp client: improve WAN option description 2011-07-18 18:15:40 +02:00
application.h s/USE_OGL/USE_OPENGL 2011-05-03 14:44:11 +02:00
audio_channels.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
audio_devices.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
cache.hpp Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
canvas.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
canvas.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
client_net_socket.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
client_net_socket.h Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
cmd_line_parser.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
cmd_line_parser.h client: s/reqired/required in CmdLineParser 2011-04-18 12:38:44 +02:00
common.h client/windows: init PACKAGE_VERSION 2011-05-12 15:13:39 +03:00
controller.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
controller.h controller: Make menu text utf-8 2010-10-25 11:36:35 +02:00
cursor_channel.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
cursor_channel.h Make cursor data @as_ptr to avoid copying data 2010-06-18 20:27:32 +02:00
cursor.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
cursor.h Make all message structs internal to spice 2010-06-18 20:27:32 +02:00
debug.h Replace log4cpp with custom log function 2010-06-28 21:54:53 +02:00
demarshallers.h Generate marshaller/demarshallers for old protocol 2010-06-22 17:34:39 +02:00
display_channel.cpp client: fix flipped video in Linux guest on windows client, RHBZ #667689 2011-05-19 12:57:41 +03:00
display_channel.h s/USE_OGL/USE_OPENGL 2011-05-03 14:44:11 +02:00
event_sources.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
foreign_menu.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
foreign_menu.h spicec: add foreign menu 2010-10-18 10:03:46 +02:00
glz_decode_tmpl.c add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
glz_decoded_image.h Fix spelling errors in comments and strings 2010-05-21 10:51:28 +02:00
glz_decoder_config.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
glz_decoder_window.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
glz_decoder_window.h spicec: Do not try to do accounting of pci memory 2010-10-09 22:27:53 +02:00
glz_decoder.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
glz_decoder.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
hot_keys.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
hot_keys.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
icon.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
inputs_channel.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
inputs_channel.h client inputs: stop blinking keyboard when out of focus 2010-12-30 12:08:31 +02:00
inputs_handler.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
jpeg_decoder.cpp add missing static 2011-05-03 14:44:11 +02:00
jpeg_decoder.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
Makefile.am autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
marshallers.h sndworker: add AudioVolume/AudioMute messages 2011-06-22 12:12:26 +02:00
menu.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
menu.h spicec: add menu id & find_sub() 2010-10-17 11:44:13 +02:00
mjpeg_decoder.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
mjpeg_decoder.h mingw32 build: fix signed/unsigned warnings as errors 2010-12-08 17:11:45 +02:00
monitor.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
monitor.h Fix inclusion of common files, no need for common/ part 2010-07-08 15:44:15 +02:00
pixels_source.h Fix inclusion of common files, no need for common/ part 2010-07-08 15:44:15 +02:00
platform.h spicec: Move setting of clipboard_owner to guest to platform code 2010-10-06 19:17:08 +02:00
playback_channel.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
process_loop.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
process_loop.h mingw32 build: fix signed/unsigned warnings as errors 2010-12-08 17:11:45 +02:00
read_write_mutex.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
record_channel.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
red_canvas_base.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
red_channel.cpp client: s/recive/receive 2011-07-18 18:15:39 +02:00
red_channel.h client: s/recive/receive 2011-07-18 18:15:39 +02:00
red_client.cpp client: don't crash when agent is missing WAN support 2011-07-18 18:15:40 +02:00
red_client.h mingw32 build: fixed using -1 as uninitialized value for unsigned variables 2010-12-08 17:11:45 +02:00
red_drawable.h Add helper to compare RedDrawable::Formats for copy compabible 2010-04-23 16:36:35 +02:00
red_gdi_canvas.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
red_gdi_canvas.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
red_gl_canvas.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
red_gl_canvas.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
red_key.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
red_peer.cpp client: s/recive/receive 2011-07-18 18:15:39 +02:00
red_peer.h client: s/recive/receive 2011-07-18 18:15:39 +02:00
red_pixmap_gdi.h Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
red_pixmap_gl.h Make client canvas and pixmaps handle more formats and simplify 2010-04-23 16:36:35 +02:00
red_pixmap_sw.h Remove all mentions of "cairo" from the code 2010-05-03 12:38:02 +02:00
red_pixmap.h Add RedDrawable::Format get_format() 2010-04-23 16:36:35 +02:00
red_sw_canvas.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
red_sw_canvas.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00
red_types.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
red_window.h s/USE_OGL/USE_OPENGL 2011-05-03 14:44:11 +02:00
screen_layer.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
screen_layer.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
screen.cpp client: fix for redundant shift+f11 RHBZ #674532 2011-06-14 10:15:41 +03:00
screen.h s/USE_OGL/USE_OPENGL 2011-05-03 14:44:11 +02:00
shared_cache.hpp support for lossy images in the pixmap cache and fill bits 2010-06-09 11:41:01 +02:00
smartcard_channel.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
smartcard_channel.h add missing "LGPLv2.1 or later" header to source files 2011-05-02 11:24:44 +02:00
threads.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
threads.h Relicense everything from GPL to LGPL 2.1+ 2010-04-13 22:22:15 +02:00
tunnel_channel.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
tunnel_channel.h mingw32 build: fix signed/unsigned warnings as errors 2010-12-08 17:11:45 +02:00
utils.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
utils.h Remove no longer used wstring_printf functions 2010-10-21 13:22:01 +02:00
zlib_decoder.cpp add #include <config.h> to all source files 2011-05-03 14:44:10 +02:00
zlib_decoder.h autotools: correctly build canvas-related code 2011-05-03 14:44:10 +02:00