- May 07, 2019
-
-
Yuri Benditovich authored
Do not keep bus, address, vid and pid of the USB device in SpiceUsbDeviceInfo structure. Getters for these properties can easily obtain them from respective backend device. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
-
Victor Toso authored
No need to add USE_POLKIT block on channel-usbredir code Signed-off-by: Victor Toso <victortoso@redhat.com>
-
Yuri Benditovich authored
As a step toward possibility to present emulated USB devices to the guest, we remove the knowledge about libusb and usbredirhost (which depends on libusb) from all the modules and concentrate it in one (usb backend) which presents abstract USB objects and internal API to all other modules. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
-
Victor Toso authored
In this patch series, spice_usbutil_libusb_strerror() becomes useless in favor of libusb_error_name(). Instead of making the helper function to call the native one, drop the usage of the helper function entirely. Signed-off-by: Victor Toso <victortoso@redhat.com>
-
Yuri Benditovich authored
libusb has libusb_error_name procedure that returns name for any error that libusb may return, so we do not need to analyze error values by ourselves. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
-
Victor Toso authored
There is no need to direct interaction with polkit in channel-usbredir. Let's keep all the access control related code to usb-acl-helper APIs. This patch moves the g_task_run_in_thread() to spice_usb_acl_helper_open_acl_async() to keep code behaving similarly to what we had before this patch. Signed-off-by: Victor Toso <victortoso@redhat.com>
-
Victor Toso authored
Explanation on this mutex in commit 4eea5f3a in 2016-03-24 by Kirill Moizik <kmoizik@redhat.com>. This is missing in the polkit code path and its the major difference with _open_device_async_cb() callback. Next patch will remove _open_device_async_cb() to keep code path for access control mandatory there so add this lock/unlock now with some context on why. Signed-off-by: Victor Toso <victortoso@redhat.com>
-
Victor Toso authored
This will allow us to simplify channel-usbredir code, which contains a few #ifdef USE_POLKIT blocks while the code itself is only calling the usb-acl-helper APIs. Let's keep the API working even when polkit is disabled. This is a preparation patch, after this patch, the channel-usbredir.c still only calls usb-acl-helper API's when polkit is enabled. The next patch adds the missing bits so the API keeps working without Polkit. Signed-off-by: Victor Toso <victortoso@redhat.com>
-
Victor Toso authored
Create helper exec_usb_acl_helper_bin() to handle the execution of spice-client-glib-usb-acl-helper binary. This bin is only compiled in spice-gtk if Polkit is enabled. This is a preparation patch for enabling the build of usb-acl-helper.c when Polkit is disabled. Signed-off-by: Victor Toso <victortoso@redhat.com>
-
Not really interesting to keep tracking what is inside or not USE_USBREDIR on channel-usbredir itself. When usbredir is disabled, just dummy functions are needed with spice-client.h include. After this patch, on channel-usbredir.c, we have a single #ifdef USE_USBREDIR and the #else block is defined in the end of the file. This patch also adds #ifdef USE_USBREDIR for channel-usbredir-priv.h as none those functions are defined when usbredir is disabled. Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- May 06, 2019
-
-
Victor Toso authored
Otherwise we'll get g_type_add_instance_private: assertion 'private_size > 0' failed Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- May 02, 2019
-
-
Frediano Ziglio authored
Headers macros (HAVE_*_H) are guarding some include in the code. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- May 01, 2019
-
-
This mitigates a fairly rare problem we see with our kiosk mode clients. That is, normally if something goes wrong with a client connection (e.g. the session is killed, or the server is restarted ), the kiosk will exit on disconnect, and we get a chance to retry the connection, or present the user with a 'server down' style message. But in the case of a serious network problem or a server hard power cycle (i.e. no TCP FIN packets can flow), our end user behavior is not ideal - the kiosk appears to hang solid, requiring a power cycle. That's because we've got the stock keepalive timeouts, or about 2 hours and 11 minutes, before the client sees the disconnect. This change will cause the client to recognize the server has vanished without a TCP FIN after 75 seconds. See this thread: https://lists.freedesktop.org/archives/spice-devel/2017-March/036553.html As well as this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1436589 Signed-off-by: Jeremy White <jwhite@codeweavers.com>
-
- Apr 27, 2019
-
-
Currently, spice-gtk uses PKG_CHECK_MODULES(SSL, openssl) to detect openssl CFLAGS and LIBS. And spice-common defines and uses SPICE_CHECK_OPENSSL macro which calls PKG_CHECK_MODULES(OPENSSL, openssl). This means that in order to override openssl CFLAGS or LIBS a user will have to set both OPENSSL_(CFLAGS|LIBS) and SSL_(CFLAGS|LIBS). To make this more consistent, make spice-gtk use the SPICE_CHECK_OPENSSL macro from spice-common. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Apr 25, 2019
-
-
Frediano Ziglio authored
Clean all git modules, not only the main one. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe de Dinechin <dinechin@redhat.com>
-
Frediano Ziglio authored
"devices" is translated to "dispositivi" (plural) not "dispositivo" (singular). In other occurrences "Some devices" is correctly translated to "Qualche dispositivo". Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Snir Sheriber <ssheribe@redhat.com>
-
Frediano Ziglio authored
build-aux/meson/check-spice-common was removed by commit 57645fac ("build-sys: remove meson/check-spice-common") Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
-
- Apr 24, 2019
-
-
Signed-off-by: Uri Lublin <uril@redhat.com>
-
Fix out-of-tree builds. Uri Lublin (1): codegen Makefile: add common/ to --include client_marshallers.h
-
- Apr 22, 2019
-
-
Signed-off-by: David Jaša <djasa@redhat.com> Acked-by: Jakub Janku <jjanku@redhat.com>
-
- Apr 18, 2019
-
-
Translation strings for spice options are already present in the respective PO files. g_option_group_set_translation_domain() call needs to be made, so that the strings marked with N_() actually get translated at runtime. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
_() should not be used in conjunction with ngettext(), otherwise it's impossible to properly translate the message into languages that have multiple plural forms, such as Czech. Additionally, spice-gtk must use dngettext instead of ngettext, otherwise the translation strings are searched within a wrong domain. Fix ngettext usage in usb-device-widget.c and update the PO files accordingly. Signed-off-by: Jakub Janků <jjanku@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
-
- Apr 10, 2019
-
-
Olivier Fourdan authored
Spice gtk-session would try to synchronize the modifiers state whenever the keymap changes, but doing so is inherently racy. While the there is a keyboard grab in effect, all key events are forwarded to the guest, hence all modifiers key press get processed by the kernel on the guest. Trying to synchronize the modifiers will generate additional key press/ release events which will result in the opposite effect and effectively desynchronize the modifier states in the guest. Synchronizing modifiers from the host should therefore be limited to focus change, as actual press/release events might have occurred without the guest knowing. Otherwise, no need to synchronize the modifiers. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Acked-by: Victor Toso <victortoso@redhat.com>
-
- Apr 08, 2019
-
-
Marc-André Lureau authored
-
- Apr 04, 2019
-
-
Frediano Ziglio authored
This brings in the following changes: Christophe Fergeau (8): canvas_base: Fix variable shadowing warning backtrace: Add missing include lz: Don't try to print uninitialized variable build: Add missing G_GNUC_PRINTF annotations build: Update verify.h to latest version test-marshallers: Fix header guard quic: Fix QUIC_VERSION definition log: Let gcc know about the logging macros which abort Eduardo Lima (Etrunko) (5): meson: Use underscorify() instead of split() meson: Bump libcacard requirement to 2.5.1 meson: switch smartcard option to auto feature meson: Bump requirement to 0.48 meson: Make targets list store dictionaries instead of lists Frediano Ziglio (31): Remove obsolete Autoconf macros log: remove deprecated SPICE_ABORT_LEVEL support log: remove deprecated SPICE_DEBUG_LEVEL support Obsolete Glib cleanup codegen: Document ptr_array attribute codegen: Use a better type for pointer converted to integer codegen: Reduce indentation codegen: Fix c_type result for TypeAlias codegen: Check wrong attribute codegen: Add a test for attribute combination mem: Fix compile error if alignment-checks option is used log: Remove useless includes proto: Remove obsolete TunnelChannel protocol: Add a dummy TunnelChannel messages: Remove fields not used by the protocol codegen: Remove support for --ptrsize codegen: Rename --prefix parameter to --suffix ci: Remove dependencies from copr build build: Remove snd_codec.h from EXTRA_DIST test-ssl-verify: Improve subject_to_x509_name coverage meson: Remove some useless checks codegen: Factor out a function to write output file codegen: Generate headers while generating code codegen: Allows to generate C declarations automatically Allow to generate C declarations for spice.proto Generate automatically most C message declarations recorder: Update build: Add new check for recorder library proto: Fix typo in message name meson: Fix dependency of generated files meson: Do not build generated files twice Marc-André Lureau (1): docs: add spice URI scheme Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Eduardo Lima (Etrunko) <etrunko@redhat.com>
-
- Mar 27, 2019
-
-
Remove unused code related to GUdevDevice. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Unify SpiceUsbDeviceInfo for Linux and Windows by using persistent libusb_device. Probably there was some problem doing it long time ago with winusb, but at least with existing libusb and UsbDk the the libusb device can be accessed as long as it is referenced. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Change the signal to report libusb_device instead of GUdevDevice object. This simplifies the callback procedure in usb-dev-manager and avoids additional reenumeration immediately after reenumeration that already done by win-usb-dev. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Christophe Fergeau authored
When getting a new list of USB devices after a WM_DEVICECHANGE event, libusb_device which were already present before the event may be represented by a different instance than the one we got in the new list. Since other layers of spice-gtk may be using that older instance of libusb_device, this commit makes sure that we always keep the older instance in GUdevClient::udev_list. At the moment, this should not be making any difference, but will make things more consistent later on. Based on a patch from Yuri Benditovich. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Mar 25, 2019
-
-
Change internal device list to maintain libusb devices instead of GUdevDevice objects. Create temporary GUdevDevice object only for indication to usb-dev-manager. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Mar 21, 2019
-
-
When processing list of USB devices, avoid allocating memory for devices which later will be skipped. Use existing libusb struct first to check whether the device shall be excluded. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Changing signal definition from (boxed-boxed) to (pointer,int). There is no need for additional referencing of GUdevDevice object before signal callback. Second parameter (action) is FALSE for device removal and TRUE for device addition. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Discard the optimization of initial device enumeration. Just after connection to the 'uevent' signal, request to report all the devices one by one as if they are inserted. Further commits will remove device enumeration in usb-dev-manager completely. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Remove unused g_udev_device_get_sysfs_attr. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
If when calling handle_dev_change, the new device has the same bus:address as an existing device cached in GUdevClient::udev_list, then an "uevent" signal will not be emitted to notify about the new device. For example, when due to some reason the 'redirecting' property is set for a long time and during this time one device is unplugged and then replugged. This commit makes the device comparison more strict by checking not only bus:addr, but also vid:pid. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
In initial device enumeration, hotplug notification can be called twice with the same libusb device. For details, see http://libusb.sourceforge.net/api-1.0/group__libusb__hotplug.html#ga00e0c69ddf1fb1b6774dc918192e8dc7 This commit filters out devices that are already present in the list. It also removes the identical call in spice_usb_device_manager_add_udev, which adds devices under Windows. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Do not create our own libusb context in usb-device-manager. Reuse existing context created by win-usb-dev instead, this will later allow usb-device-manager to use libusb devices enumerated in win-usb-dev. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Removing unused parameter from GUdevClient constructor. This code is used only in Windows builds. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
Replacing USE_GUDEV with G_OS_WIN32 anywhere. GUDEV simulation is used only in Windows build. Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-
- Mar 19, 2019
-
-
Christophe Fergeau authored
spice-server does not deal properly with multiple smartcard readers, only the first one will be working. Add a warning when this happens to make it easier to diagnose such issues. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com> Acked-by: Marc-André Lureau <marcandre.lureau@gmail.com>
-