summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-08-15migration: copy enable-smartcard and enable-audio state to the migrated sessionseamless-migration.v1Yonit Halperin1-0/+6
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.
2012-08-15seamless migration: don't reset messages data when swapping channelsYonit Halperin6-14/+33
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.
2012-08-15seamless migration: transfer pending msgs to the destination, instead of ↵Yonit Halperin1-4/+3
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).
2012-08-15seamless migration: src and dest servers handshakeYonit Halperin4-9/+178
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
2012-08-15seamless-migration: update spice-common submoduleYonit Halperin2-3/+3
Update channel-main as well to support the change made to SpiceMsgMainMigrationBegin: it now holds all the destination fields inside SpiceMigrationDstInfo.
2012-08-14channel_main: handle SPICE_MSG_AGENT_CONNECTED_TOKENSYonit Halperin2-0/+12
2012-08-14channel-base: remove bad check of SpiceMsgWaitForChannels validityYonit Halperin1-3/+0
SpiceMsgWaitForChannels is not packed. Comparing the original msg size to SpiceMsgWaitForChannels is wrong.
2012-08-10Check --spice-disable-effects parameter validityChristophe Fergeau1-1/+24
When --spice-disable-effects is used, error out unless this is the name of one of the effects we can disable. Fixes rhbz#818848
2012-08-10Check --spice-color-depth parameter validityChristophe Fergeau1-1/+28
When --spice-color-depth is used, error out unless the color depth is 16 or 32. Fixes rhbz#818847
2012-08-09Update spice-commonMarc-André Lureau1-0/+0
2012-08-08build: make spice-controller.pc installation conditionalChristophe Fergeau1-1/+4
It shouldn't be installed when controller support is disabled.
2012-08-08build: generate sym-fileChristophe Fergeau3-5/+112
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.
2012-08-07build: add --enable-smartcard=auto supportChristophe Fergeau1-9/+13
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.
2012-08-07build: make controller build optionalChristophe Fergeau2-1/+12
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.
2012-08-05Don't use GDK_THREADS_ENTER/LEAVEMatthias Clasen1-2/+2
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).
2012-07-30Remove "usbredirhost: " prefix from usbredirhost error messagesHans de Goede1-2/+7
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>
2012-07-28channel-display: Set monitors_max to 1 on initHans de Goede1-0/+1
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>
2012-07-28spice-widget: release mouse grab on keyboard-grab-inhibitHans de Goede1-1/+4
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>
2012-07-18Run-time check monitor per display count <= 256Marc-André Lureau1-1/+15
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...
2012-07-16Enable the display early when the widget is createdMarc-André Lureau1-1/+1
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..
2012-07-16Add SpiceDisplay:ready propertyMarc-André Lureau2-6/+56
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.
2012-07-16Handle MonitorsConfig::max_allowedMarc-André Lureau1-2/+27
2012-07-16main: send monitor config immediatelyMarc-André Lureau1-3/+6
The only way this can be called currently is via the main/system coroutine. Remove display timer if any.
2012-07-16Implement simple monitors alignmentMarc-André Lureau1-3/+69
2012-07-16widget: use display monitors configurationMarc-André Lureau1-9/+56
Use display::monitors property to manage display area. Call update_area_monitor() to update the widget area depending on monitor configuration
2012-07-16spicy: disable display when deleting windowMarc-André Lureau1-1/+15
2012-07-16spicy: learn to deal with monitorsMarc-André Lureau1-14/+85
2012-07-16Make-up a MonitorConfig if the server doesn't provide oneMarc-André Lureau1-1/+12
This allows easier compatibility for clients that don't have to check and interact differently depending on channel capabilities.
2012-07-16Handle SPICE_MSG_DISPLAY_MONITORS_CONFIGMarc-André Lureau1-0/+33
2012-07-16Don't attempt to draw an invalid areaMarc-André Lureau1-2/+4
If we don't intersect, the area is invalid or of size 0.
2012-07-16Use monitor_id to compute display_idMarc-André Lureau2-4/+17
2012-07-16Document spice_main_send_monitor_config()Marc-André Lureau1-0/+9
2012-07-16widget: don't forget to disconnect all signals handlersMarc-André Lureau1-90/+32
We forgot about display-mark. Use spice_g_signal_connect_object() helper, which will disconnect properly in all circunstances.
2012-07-16spice_channel_connect() success if state >= CONNECTINGMarc-André Lureau1-1/+1
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.
2012-07-16widget: add monitor property with ctorMarc-André Lureau5-3/+52
2012-07-16Claim SPICE_DISPLAY_CAP_MONITORS_CONFIGMarc-André Lureau1-0/+1
2012-07-16Add spice_display_get_primary()Marc-André Lureau3-1/+51
2012-07-16display: add readonly monitors propertyMarc-André Lureau2-0/+38
2012-07-16glib-compat: add g_clear_pointerMarc-André Lureau1-0/+20
A helpful macro from glib 2.34
2012-07-16Change surface_id to a guint32Marc-André Lureau2-3/+3
That's the correct type used by the protocol.
2012-07-16widget: add main channel before other channelsMarc-André Lureau1-1/+8
Make sure that the d->main channel member can be referenced when adding further channels, when we perform their setup.
2012-07-16Add missing agent cap descriptionMarc-André Lureau1-0/+1
2012-07-16display: learn to restrict display to an areaMarc-André Lureau4-87/+134
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
2012-07-16widget: simplify redraw callMarc-André Lureau1-2/+1
2012-07-16Update spice-commonMarc-André Lureau1-0/+0
2012-07-16usb-device-manager: mingw: connect: cleanup device if it's libdev is missingUri Lublin1-0/+9
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.
2012-07-12migration/channel-inputs: reset motion count after migrationYonit Halperin1-0/+10
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
2012-07-11usb-device-manager: do not try to connect a usb device that was removedUri Lublin1-0/+7
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.
2012-07-11usbutil: be more explicit about usbids_vendor_count usageMarc-André Lureau1-4/+5
I introduced a regression in the previous patch, counting the usbids_vendor_count from -1 if the previous attempt failed.
2012-07-11usbutil: fix crash on windowsMarc-André Lureau1-2/+15
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==