Le 15/04/2018 à 17:59, Luke Faraone a écrit :
Enclosed. Doesn't appear to have changed the output.

Exact.

Try with this new patch.
You will have to remove the previous patch, or start from the clean sources 
first.

Thanks

--
 Dr. Ludovic Rousseau
diff --git a/src/hotplug_libudev.c b/src/hotplug_libudev.c
index 184b6b3..534aae3 100644
--- a/src/hotplug_libudev.c
+++ b/src/hotplug_libudev.c
@@ -330,6 +330,14 @@ static void HPRemoveDevice(struct udev_device *dev)
        struct udev_device *parent;
        const char *sysname;
 
+       sysname = udev_device_get_sysname(dev);
+       if (!sysname)
+       {
+               Log1(PCSC_LOG_ERROR, "udev_device_get_sysname() failed");
+               return;
+       }
+       Log2(PCSC_LOG_DEBUG, "removing sysname: %s", sysname);
+
        /* The device pointed to by dev contains information about
           the interface. In order to get information about the USB
           device, get the parent device with the subsystem/devtype pair
@@ -338,7 +346,10 @@ static void HPRemoveDevice(struct udev_device *dev)
        parent = udev_device_get_parent_with_subsystem_devtype(dev, "usb",
                "usb_device");
        if (!parent)
+       {
+               Log0(PCSC_LOG_DEBUG);
                return;
+       }
 
        devpath = udev_device_get_devnode(parent);
        if (!devpath)
@@ -348,13 +359,6 @@ static void HPRemoveDevice(struct udev_device *dev)
                return;
        }
 
-       sysname = udev_device_get_sysname(dev);
-       if (!sysname)
-       {
-               Log1(PCSC_LOG_ERROR, "udev_device_get_sysname() failed");
-               return;
-       }
-
        for (i=0; i<PCSCLITE_MAX_READERS_CONTEXTS; i++)
        {
                if (readerTracker[i].fullName && !strcmp(sysname, 
readerTracker[i].sysname))

Reply via email to