]> git.zerfleddert.de Git - usb-driver/commitdiff
release usb-device on close
authorMichael Gernoth <michael@gernoth.net>
Thu, 10 Apr 2008 20:31:10 +0000 (22:31 +0200)
committerMichael Gernoth <michael@gernoth.net>
Thu, 10 Apr 2008 20:31:10 +0000 (22:31 +0200)
usb-driver.c

index 942cdc15a01c8ed59a3d86eb12b26813b1d1799e..1162d51b98836e377911c0321e996c07058cf569 100644 (file)
@@ -858,8 +858,10 @@ int close(int fd) {
        if (fd == windrvrfd && windrvrfd >= 0) {
                DPRINTF("close windrvrfd\n");
 
        if (fd == windrvrfd && windrvrfd >= 0) {
                DPRINTF("close windrvrfd\n");
 
-               if (usb_devhandle)
+               if (usb_devhandle) {
+                       usb_claim(0);
                        usb_close(usb_devhandle);
                        usb_close(usb_devhandle);
+               }
 
                usb_devhandle = NULL;
                usbinterface = -1;
 
                usb_devhandle = NULL;
                usbinterface = -1;
Impressum, Datenschutz