fixed bug, that causes CanoScan devices to use the wrong calibration functions,
authorGerhard Jaeger <gerhard@gjaeger.de>
Thu, 23 Oct 2003 07:26:32 +0000 (07:26 +0000)
committerGerhard Jaeger <gerhard@gjaeger.de>
Thu, 23 Oct 2003 07:26:32 +0000 (07:26 +0000)
sanei_usb_get_vendor_product() fails.

backend/plustek-usb.c
backend/plustek.c

index e92424a..7df62d3 100644 (file)
@@ -575,7 +575,7 @@ static int usbDev_open( const char *dev_name, void *misc )
 
        } else {
 
-               DBG( _DBG_INFO, "Can't get vendor ID from driver...\n" );
+               DBG( _DBG_INFO, "Can't get vendor & product ID from driver...\n" );
 
                /* if the ioctl stuff is not supported by the kernel and we have
          * nothing specified, we have to give up...
@@ -587,8 +587,10 @@ static int usbDev_open( const char *dev_name, void *misc )
                return -1;
                }
                
-               vendor = strtol( dev->usbId, 0, 0 );
-               DBG( _DBG_INFO, "... using the specified: 0x%04x\n", vendor );
+               vendor  = strtol( &dev->usbId[0], 0, 0 );
+               product = strtol( &dev->usbId[7], 0, 0 );
+               DBG( _DBG_INFO, "... using the specified: "
+                               "0x%04x-0x%04x\n", vendor, product );
        }
 
     /*
@@ -619,6 +621,9 @@ static int usbDev_open( const char *dev_name, void *misc )
        dev->usbDev.vendor  = vendor;
        dev->usbDev.product = product;
 
+       DBG( _DBG_INFO, "Detected vendor & product ID: "
+                               "0x%04x-0x%04x\n", vendor, product );
+
        /*
         * Plustek uses the misc IO 1/2 to get the PCB ID
         * (PCB = printed circuit board), so it's possible to have one
index 3f13f16..a374cfe 100644 (file)
 #include "../include/sane/sanei.h"
 #include "../include/sane/saneopts.h"
 
-#define BACKEND_VERSION "0.46-6"
+#define BACKEND_VERSION "0.46-7"
 #define BACKEND_NAME   plustek
 #include "../include/sane/sanei_backend.h"
 #include "../include/sane/sanei_config.h"