[Spice-devel] [PATCH 2/5] WinUsbDev: add redirecting state to GUdevClientPrivate

Christophe Fergeau cfergeau at redhat.com
Fri Jul 3 06:18:41 PDT 2015


On Fri, Jul 03, 2015 at 04:05:40PM +0300, Dmitry Fleytman wrote:
> 
> > On Jul 3, 2015, at 15:56 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> > 
> > On Thu, Jul 02, 2015 at 04:41:32PM +0300, Kirill Moizik wrote:
> >> we need to add redirecting  state to singleton  since wnd_proc callback should not query usb devices
> >> in the middle of redirecting flow.
> > 
> > Why ?
> 
> Because in the middle of redirecting flow caller may get inconsistent
> enumeration results (due to device resets performed by UsbDk and
> Windows mechanisms handling those resets),
> UsbDk API intentionally returns error when enumeration is called during start/stop redirection flows.

All of this should be in the commit log.

If enumerating returns an error, maybe the wnd_proc callback can just
deal with the error, set a boolean indicating that an enumeration should
be performed when possible, and retry the enumeration as soon as the
'redirecting' state changes?

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/20150703/000fb708/attachment.sig>


More information about the Spice-devel mailing list