> On Aug 11, 2015, at 13:52 PM, Christophe Fergeau <cfergeau@xxxxxxxxxx> wrote: > > "usb" in the subject line > You need to explain why you don't want to do that while redirection is > in progress, either in the commit log, or in a code comment (I'd go with > a code comment as this is not obvious). > The code which calls handle_dev_change() in > spice_g_udev_set_redirecting() logically belongs here. > Added explanation in v4. > > On Mon, Aug 03, 2015 at 04:10:43PM +0300, Kirill Moizik wrote: >> From: Kirill Moizik <kmoizik@xxxxxxxxxx> >> >> --- >> src/win-usb-dev.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/src/win-usb-dev.c b/src/win-usb-dev.c >> index 875ef89..c42273f 100644 >> --- a/src/win-usb-dev.c >> +++ b/src/win-usb-dev.c >> @@ -360,6 +360,9 @@ static void handle_dev_change(GUdevClient *self) >> GList *llist, *slist; /* long-list and short-list*/ >> GList *lit, *sit; /* iterators for long-list and short-list */ >> GUdevDevice *ldev, *sdev; /* devices on long-list and short-list */ >> + if (priv->redirecting == TRUE) { >> + return; >> + } >> >> dev_count = g_udev_client_list_devices(self, &now_devs, &err, >> __FUNCTION__); >> -- >> 2.4.3 >> >> _______________________________________________ >> Spice-devel mailing list >> Spice-devel@xxxxxxxxxxxxxxxxxxxxx >> http://lists.freedesktop.org/mailman/listinfo/spice-devel _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel