Hi Daniel, Bastien, i found the bug!
On function fp_get_next_timeout of libfprint (file poll.c) if exist fprint timeout or libusb timeout the function return the smaller of the 2 timeout. But if one of that not exist and have a smaller value the function return a timeout that not exist. The attached patch fix the bug. It possible to apply the patch to the library ? Thank Sergio 2011/2/14 sergio cerlesi <[email protected]> > Hi Bastien, > > at first, sorry for my bad english e if i'm not clear. > > The problem is that the driver i wrote for device Validity VFS101 work with > fprint_demo and pam_fprint but NOT with pam_fprintd. > > I debug the driver and i find that the cause of problem is a call of > function fpi_timeout_add on the driver. Below i report the portion of code > that have the problem: > > /* Callback of asynchronous sleep */ > static void async_sleep_cb(void *data) > { > struct fpi_ssm *ssm = data; > > fpi_ssm_next_state(ssm); > } > > /* Submit asynchronous sleep */ > static void async_sleep(unsigned int msec, struct fpi_ssm *ssm) > { > if (fpi_timeout_add(msec, async_sleep_cb, ssm) == NULL) > fpi_ssm_mark_aborted(ssm, -ETIME); > } > > If i use fprint_demo or pam_fprint for test the driver the callback > function are correctly called after timeout and the driver work. > If i use pam_fprintd (fprintd-0.2.0) the callback are never called and the > driver are blocked. > > I can't understand if it's a bug of driver or of fprintd. Can you help me ? > > Bye > Sergio > > 2011/2/14 Bastien Nocera <[email protected]> > > On Mon, 2011-02-14 at 09:25 +0100, sergio cerlesi wrote: >> > Hi Daniel, Bastien, >> > >> > i'm working on fprint Validity VFS101 driver. The driver work with >> > fprint_demo and pam_fprint but not with fprintd. >> > >> > The cause of problem is that it call the function fpi_timeout_add that >> > take conflict with fprintd ( the callback is never call). >> > >> > I can't use this function or is a bug of fprintd ? >> > >> > I'm not sure but i think that other drivers like uru4000 can have the >> > same problem. >> >> Sorry Sergio, but I don't understand what the problem is here... >> >> Cheers >> >> >
libfprint-0.3.0-next_timeout.patch
Description: Binary data
_______________________________________________ fprint mailing list [email protected] http://lists.reactivated.net/mailman/listinfo/fprint
