[Spice-commits] gtk/usb-device-manager.c

Hans de Goede jwrdegoede at kemper.freedesktop.org
Tue Feb 12 02:50:34 PST 2013


 gtk/usb-device-manager.c |    2 --
 1 file changed, 2 deletions(-)

New commits:
commit b5452c877ae96679c425ab97dff394b2840b6e82
Author: Hans de Goede <hdegoede at redhat.com>
Date:   Mon Feb 11 20:29:58 2013 +0100

    usb-device-manager: Fix coldplug race
    
    It is possible for us to see a device show up twice, if it gets plugged
    in between us starting listening for new devices and doing "coldplug", then
    it will get added once from the coldplug code, and then again from from
    the hotplug code path. We already have code checking for this, but the check
    is only compiled in under Windows -> Remove the #ifdef to also catch this
    under Linux.
    
    Signed-off-by: Hans de Goede <hdegoede at redhat.com>

diff --git a/gtk/usb-device-manager.c b/gtk/usb-device-manager.c
index 3f4c272..34ff37c 100644
--- a/gtk/usb-device-manager.c
+++ b/gtk/usb-device-manager.c
@@ -699,13 +699,11 @@ static void spice_usb_device_manager_add_dev(SpiceUsbDeviceManager  *self,
         return;
     }
 
-#ifdef G_OS_WIN32
     device = spice_usb_device_manager_find_device(self, bus, address);
     if (device) {
         SPICE_DEBUG("USB device at %d.%d already exists, ignored", bus, address);
         return;
     }
-#endif
 
     if (priv->coldplug_list)
         dev_list = priv->coldplug_list;


More information about the Spice-commits mailing list