Hello,
you can test easily the patch with the following program run with
SANE_DEBUG_SANEI_USB=6 :
#include stdlib.h
#include string.h
#include check.h
/* sane includes for the sanei functions called */
#include ../include/sane/sane.h
#include ../include/sane/saneopts.h
#include
there is a prog that does just this in the sane experimental tree.
Stef- I'm gonna look at your patch this afternoon, and see if i can
add missing device removal to it as well. If it works, I'll commit it,
cause it looks like the right fix.
allan
On Thu, Dec 11, 2008 at 12:39 AM, stef stef.dev
Well, this patch prevents removed scanners from being removed from the
global list, so if you unplug and replug the scanner 100 times, you
run out of device indexes, and frontend will see 99 non-existent
scanners. However, if we add removal code, then there is the
possibility that we might drop a
Hello,
here's a patch to improve sanei_usb_init() behavior. It works by using
an
internal function to store device instead of writing them directly in the
devices array. This function first checks if the device doesn't exist yet
using the equals() function, and then add it if
stef stef.dev at free.fr wrote:
140c140,141
/* total number of devices that can be opened at the same time */
---
/**
* total number of devices that can be opened at the same time */
143c144,145
/* per-device information, using the functions' parameters dn as index */
---
diff -u,
enjoy.
allan
On Sun, Dec 7, 2008 at 5:04 AM, Julien BLACHE jb at jblache.org wrote:
stef stef.dev at free.fr wrote:
140c140,141
/* total number of devices that can be opened at the same time */
---
/**
* total number of devices that can be opened at the same time */
143c144,145
/*