[Spice-devel] [PATCH v4 11/16] UsbDevicemanager: Track device disconnection operations in progress

Christophe Fergeau cfergeau at redhat.com
Wed Sep 23 04:01:51 PDT 2015


Please explain why you want to do that in the commit log (I guess same
explanation as in the commit adding this redirecting state, during
device disconnection, unwanted hotplug events may happen, which we need
to ignore?)

On Sun, Aug 16, 2015 at 03:35:48PM +0300, Dmitry Fleytman wrote:
> From: Kirill Moizik <kmoizik at redhat.com>
> 
> Signed-off-by: Kirill Moizik <kmoizik at redhat.com>
> Signed-off-by: Dmitry Fleytman <dfleytma at redhat.com>
> ---
>  src/usb-device-manager.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/src/usb-device-manager.c b/src/usb-device-manager.c
> index 317e3d0..99ff4d9 100644
> --- a/src/usb-device-manager.c
> +++ b/src/usb-device-manager.c
> @@ -1705,6 +1705,8 @@ void _disconnect_device_async_cb(GObject *gobject,
>      }
>  #endif
>  
> +    _set_redirecting(self, FALSE);
> +

Doing that in the main thread with g_idle_add() would feel safer, or is
this already guaranteed to run in the main thread?

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20150923/cb92b228/attachment.sig>


More information about the Spice-devel mailing list