Age | Commit message (Collapse) | Author | Files | Lines |
|
Otherwise, we will not create smartcard channel on the destination
side, and we will create audio channels, no matter if they existed
of didn't exist for the src side.
|
|
When swapping the src and dest channels's, we need to keep
the xmit_queue and msg serials. Their state is expected to stay the same
after migration.
|
|
sending them to the src before FLUSH_MARK
In order to save migration time, and probably also decrease migration
data size, we push the flush mark to the src server before any other
message. All the other pending msgs will be sent later to the
destination server (see next patch).
|
|
Flow:
(1) *src* main channel coroutine (main_handle_migrate_begin_seamless):
handles SPICE_MSG_MAIN_MIGRATE_BEGIN_SEAMLESS; yields to the main loop,
supplying it the destination information needed for connection.
(2) main context (migrate_connect):
Establishes a new session for connecting to the destination.
After all the channels are opened (async), their state, except for
the one of the main channel, is modified to
SPICE_CHANNEL_STATE_MIGRATING (see migrate_channel_event_cb);
no reading is done from the channel during this state.
The dest main channel's state is changed to SPICE_CHANNEL_STATE_MIGRATION_HANDSHAKE
(3) *dest* main channel coroutine: sends to the dest server SPICE_MSGC_MAIN_MIGRATE_DST_DO_SEAMLESS
(see spice_channel_recv_auth)
(4) *dest* main channel coroutine: recevices SPICE_MSG_MAIN_MIGRATE_DST_SEAMLESS_ACK/NACK.
Then it emits the signal "migration-handshake-done".
(5) main context: when all the dest session channels are connected, and the main channel handshake
is done, we yield to the src main channel coroutine (see
migrate_channel_event_cb and main_migrate_handshake_done_cb)
(6) *src* main channel coroutine: sends to the src server
SPICE_MSGC_MAIN_MIGRATE_(CONNECTED|CONNECTED_SEAMLESS|CONNECT_ERROR)
For more details see spice-protocol. commit
1ad5d259cb4b695ec3106de7ccd082e031e7ae11
|
|
Update channel-main as well to support the change made to
SpiceMsgMainMigrationBegin: it now holds all the destination fields
inside SpiceMigrationDstInfo.
|
|
|
|
SpiceMsgWaitForChannels is not packed. Comparing the original
msg size to SpiceMsgWaitForChannels is wrong.
|
|
When --spice-disable-effects is used, error out unless this is
the name of one of the effects we can disable.
Fixes rhbz#818848
|
|
When --spice-color-depth is used, error out unless the color depth
is 16 or 32.
Fixes rhbz#818847
|
|
|
|
It shouldn't be installed when controller support is disabled.
|
|
When -Wl,--version-script is not available, we fallback to using
libtool --export-symbols feature, but the needed sym-file is missing
from git. This commit adds generation of the sym-file to the
update-map-file Makefile target, and adds a sym-file to git.
The linker on OSX Lion doesn't like to have non-existing symbols
specified in the symbol files it's given, so the symbols need to
be split in glib symbols and gtk symbols.
|
|
Currently, when running configure with no arguments, smartcard
support is enabled by default, and configure will fail if it cannot
find libcacard. This commit adds a --enable-smartcard=auto mode to
configure which will use automatically enable smartcard support if
libcacard is available, but it will be silently disabled if libcacard
is not available. Passing --enable-smartcard will fail if libcacard
is not available. Passing --disable-smartcard will always disable
smartcard support and will not test for libcacard availability.
|
|
Apart from the Vala bindings, this is the only part of spice-gtk
which requires Vala to be built from git. Since it's only useful
when spice-gtk is used in conjunction with an oVirt browser plugin,
letting people disabling it will not necessarily cause issues.
|
|
These macros have been deprecated. The quick fix for now is to just use the
functions gdk_threads_enter/leave instead. They are deprecated as well, but
deprecated functions don't cause the build to fail (unless you use -Werror).
|
|
libusbredirhost prefixes all its messages with "usbredirhhost: ", which
is useful when logging to stderr, but not so much when showing the error
to the user in an error dialog, so remove the "usbredirhost: " prefix
when we store the message in a GError.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
This fixes remote-viewer with the new multi monitor support not working
when connecting to a spice-server without the new multi-monitor support.
Before this fix remote-viewer would hit the following g_return_if_fail:
(remote-viewer:24787): remote-viewer-CRITICAL **:
virt_viewer_session_spice_display_monitors:
assertion `monitors->len <= monitors_max' failed
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
The purpose of the keyboard-grab-inihbit mechanism is to allow other apps
to grab the input while the spice-widget has the focus, mainly when we're
going to invoke policykit for usb-redirection, as that the policy-kit
agent may want to grab the input.
Before this patch we were only inhibitting the keyboard grab, which works fine
for vms which are in client mouse mode, but is not enough for vms which are
in server mouse mode.
This patch also releases the mouse grab on keyboard-grab-inhibit, fixing
the policykit dialog not showing (and thus usb redir not working) when
running with server mouse mode. Note that this makes the inhibit-keyboard-grab
name of the property no longer really cover what it does, but allas it is
part of our ABI...
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Limit range of monitors, to avoid potential crashes lead by invalid
received MonitorConfig values (could be misconfigured or misbehaving
guest)
This is a a client-side implementation limitation. Eventually, the
range could be inscreased (or unlimited == 0) in the future...
|
|
The spice_main_set_display_enabled() function is used to mark the
display/monitor config as enabled. In order to simplify client
implementation, the widget enables the matching display automatically
when the channel mark is received. This is only for legacy reason, and
my lack of understanding at that time. It could as well be enabled
earlier, when the widget is created. It wasn't really a good decision
to disable monitor when the mark is off, which can be toggled when the
primary surface is resize for example, and can cause some races..
|
|
There are several condition to meet in order to have a widget ready to
be displayed: the monitor must exist, the area must intersect, and the
display mark must be reached. This property will help clients to know
when the widget display is ready. Until now, it was relying on the
channel mark signal only, and had to deal with the rest of the
conditions without much help.
|
|
|
|
The only way this can be called currently is via the main/system
coroutine. Remove display timer if any.
|
|
|
|
Use display::monitors property to manage display area. Call
update_area_monitor() to update the widget area depending on monitor
configuration
|
|
|
|
|
|
This allows easier compatibility for clients that don't have to
check and interact differently depending on channel capabilities.
|
|
|
|
If we don't intersect, the area is invalid or of size 0.
|
|
|
|
|
|
We forgot about display-mark. Use spice_g_signal_connect_object()
helper, which will disconnect properly in all circunstances.
|
|
We may have several widget trying to re-connect the channels now.
It is fine to return successfully if we are already connecting or
connected.
|
|
|
|
|
|
|
|
|
|
A helpful macro from glib 2.34
|
|
That's the correct type used by the protocol.
|
|
Make sure that the d->main channel member can be referenced when
adding further channels, when we perform their setup.
|
|
|
|
Each spice widget can now restrict the area of the primary
surface they show and interact with by setting the private
area member.
A nice clean-up would be to seperate an area object that
would deal with clipping, input translation and color
conversion, but the resulting code would be similar anyway
|
|
|
|
|
|
For Windows client, when connecting a device to the guest, if a libusb
device (libdev) does not exist, cleanup and forget about that device.
Most likely, the device was plugged out at driver installation
time, and its remove-device event was ignored.
|
|
The motion count must stay synchronized with the server, otherwise,
it is possible that we will stop sending motion events to the server
after migration.
rhbz#835997
|
|
If a device that is asked to be shared with the guest, is unplugged out
of the machine before being redirected, then let the user know that
usbredir of that device failed (and cleanup nicely).
For Windows client, the time between request and redir is larger, as
it includes the time it takes to install the libusb driver.
|
|
I introduced a regression in the previous patch, counting the
usbids_vendor_count from -1 if the previous attempt failed.
|
|
vendor_count is the last access index, the actually count is +1.
On Windows, it crashes later on because of corrupted memory.
Thanks to valgrind for this precious help:
==4535== Invalid write of size 2
==4535== at 0x40197E: spice_usbutil_parse_usbids (usbutil.c:170)
==4535== by 0x401CEC: spice_usbutil_load_usbids (usbutil.c:241)
==4535== by 0x4020C6: main (usbutil.c:322)
==4535== Address 0x56b740c is 12 bytes after a block of size 348,160 alloc'd
==4535== at 0x4A0884D: malloc (vg_replace_malloc.c:263)
==4535== by 0x4EAAEBE: g_malloc (gmem.c:159)
==4535== by 0x401847: spice_usbutil_parse_usbids (usbutil.c:156)
==4535== by 0x401CEC: spice_usbutil_load_usbids (usbutil.c:241)
==4535== by 0x4020C6: main (usbutil.c:322)
==4535==
|