[Spice-devel] [PATCH v7 09/10] win-usbredir: Use UsbDk backend when available

Jonathon Jongsma jjongsma at redhat.com
Fri Feb 19 21:38:23 UTC 2016


Acked-by: Jonathon Jongsma <jjongsma at redhat.com>


On Thu, 2016-02-11 at 18:04 +0200, Dmitry Fleytman wrote:
> Signed-off-by: Dmitry Fleytman <dmitry at daynix.com>
> ---
>  src/usb-device-manager.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> index 0ae9b9b..ef13b98 100644
> --- a/src/usb-device-manager.c
> +++ b/src/usb-device-manager.c
> @@ -232,7 +232,8 @@ static void
> spice_usb_device_manager_init(SpiceUsbDeviceManager *self)
>      self->priv = priv;
>  
>  #if defined(G_OS_WIN32) && defined(USE_USBREDIR)
> -    priv->use_usbclerk = TRUE;
> +    priv->use_usbclerk = !usbdk_is_driver_installed() ||
> +                         !(priv->usbdk_api = usbdk_api_load());
>  #endif
>      priv->channels = g_ptr_array_new();
>  #ifdef USE_USBREDIR
> @@ -374,6 +375,7 @@ static void spice_usb_device_manager_finalize(GObject
> *gobject)
>      }
>      if (!priv->use_usbclerk) {
>          _usbdk_hider_clear(self);
> +        usbdk_api_unload(priv->usbdk_api);
>      }
>  #endif
>  #endif


More information about the Spice-devel mailing list