Compare commits

...

11 Commits

Author SHA1 Message Date
Bastien Nocera
da95af0f48 0.8.2 2018-07-17 13:48:13 +02:00
Bastien Nocera
28b6f643d8 Merge branch 'wip/hadess/downgrade-assert-2' into 'master'
Another assert downgrade

See merge request libfprint/libfprint!7
2018-07-17 11:47:10 +00:00
Bastien Nocera
22277c7277 build: Downgrade meson in CI script
It failed to finish the build otherwise:
https://github.com/mesonbuild/meson/issues/3892
2018-07-17 13:43:00 +02:00
Bastien Nocera
19e7b217c1 lib: Downgrade fp_err() to be non-fatal
Similarly to b1ac865abd, downgrade
fp_err() to be non-fatal. A number of drivers would spit out an error
when encountering this call, but not crash, carry on and most of the
time recover.

Make sure we don't assert in those cases.
2018-07-16 16:08:54 +02:00
Bastien Nocera
29d3541b74 lib: Downgrade BUG* assertions to work-around crashes #2
Same as b1ac865abd but for the drivers
API.
2018-07-16 16:07:25 +02:00
Bastien Nocera
b9e5b3a55c Merge branch 'wip/hadess/downgrade-assert' into 'master'
lib: Downgrade BUG* assertions to work-around crashes

Closes #77

See merge request libfprint/libfprint!6
2018-07-03 09:44:56 +00:00
Bastien Nocera
b1ac865abd lib: Downgrade BUG* assertions to work-around crashes
BUG() and BUG_ON() didn't use to assert, but only print an error if
debugging was enabled. This was hiding a lot of state bugs in drivers,
and transforming those into assertions causes crashes.

Downgrade the assertion to only print a warning, and hope that those
eventually get fixed in the drivers so we can re-enable them.

Closes: #77
2018-07-03 11:40:25 +02:00
Bastien Nocera
21504c0621 Merge branch 'wip/hadess/poll-retval' into 'master'
poll: Fix fp_get_pollfds retval type

See merge request libfprint/libfprint!5
2018-06-26 13:18:40 +00:00
Bastien Nocera
056ea541dd poll: Fix fp_get_pollfds retval type
fp_get_pollfds() is supposed to return a negative value on failure, but
size_t is an unsigned integer. Use ssize_t instead.
2018-06-26 14:53:53 +02:00
Bastien Nocera
871fddf5fb Merge branch 'wip/hadess/more-upekts-statuses' into 'master'
upekts: Fix enrollment never finishing on some upekts devices

See merge request libfprint/libfprint!3
2018-06-20 17:16:08 +00:00
Bastien Nocera
c284858d06 upekts: Fix enrollment never finishing on some upekts devices
Add support for more device status codes, brought back from the
now-removed UPEKE2 driver.

See 3bf55a3e07/libfprint/drivers/upeke2.c (L1013)
2018-06-19 11:11:04 +02:00
8 changed files with 37 additions and 11 deletions

View File

@@ -8,7 +8,7 @@ variables:
before_script:
- dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES
- dnf update -y --nogpgcheck && dnf install -y --nogpgcheck $DEPENDENCIES && rpm -Uvh --oldpackage https://kojipkgs.fedoraproject.org//packages/meson/0.46.1/2.fc29/noarch/meson-0.46.1-2.fc29.noarch.rpm
build:

11
NEWS
View File

@@ -1,6 +1,17 @@
This file lists notable changes in each release. For the full history of all
changes, see ChangeLog.
2018-07-15: v0.8.2 release
* Drivers:
- Add USB ID for TNP Nano USB Fingerprint Reader
- Fix UPEKTS enrollment never finishing on some devices
* Library:
- Fix fp_get_pollfds() retval type, a small ABI change
- Downgrade fatal errors to run-time warnings, as a number of drivers
used to throw silent errors and we made them fatal. Those will now
be visible warnings, hopefully helping with fixing them.
2018-06-12: v0.8.1 release
- Brown paperbag release to install the udev rules file in the correct
directory if the udev pkg-config file doesn't have a trailing slash

View File

@@ -1018,6 +1018,9 @@ static void e_handle_resp00(struct fp_dev *dev, unsigned char *data,
case 0x0c:
case 0x0d:
case 0x0e:
case 0x26:
case 0x27:
case 0x2e:
/* if we previously completed a non-last enrollment stage, we'll
* get this code to indicate successful stage completion */
if (upekdev->enroll_passed) {

View File

@@ -40,10 +40,16 @@
#define fp_dbg g_debug
#define fp_info g_debug
#define fp_warn g_warning
#define fp_err g_error
#define fp_err g_warning
#define BUG_ON(condition) g_assert(!(condition))
#define BUG() g_assert_not_reached()
#define BUG_ON(condition) G_STMT_START \
if (condition) { \
char *s; \
s = g_strconcat ("BUG: (", #condition, ")", NULL); \
g_warning ("%s: %s() %s:%d", s, G_STRFUNC, __FILE__, __LINE__); \
g_free (s); \
} G_STMT_END
#define BUG() BUG_ON(1)
enum fp_dev_state {
DEV_STATE_INITIAL = 0,

View File

@@ -42,10 +42,16 @@
#define fp_dbg g_debug
#define fp_info g_debug
#define fp_warn g_warning
#define fp_err g_error
#define fp_err g_warning
#define BUG_ON(condition) g_assert(!(condition))
#define BUG() g_assert_not_reached()
#define BUG_ON(condition) G_STMT_START \
if (condition) { \
char *s; \
s = g_strconcat ("BUG: (", #condition, ")", NULL); \
g_warning ("%s: %s() %s:%d", s, G_STRFUNC, __FILE__, __LINE__); \
g_free (s); \
} G_STMT_END
#define BUG() BUG_ON(1)
enum fp_dev_state {
DEV_STATE_INITIAL = 0,

View File

@@ -314,7 +314,7 @@ struct fp_pollfd {
int fp_handle_events_timeout(struct timeval *timeout);
int fp_handle_events(void);
size_t fp_get_pollfds(struct fp_pollfd **pollfds);
ssize_t fp_get_pollfds(struct fp_pollfd **pollfds);
int fp_get_next_timeout(struct timeval *tv);
/**

View File

@@ -313,12 +313,12 @@ API_EXPORTED int fp_get_next_timeout(struct timeval *tv)
*
* Returns: the number of pollfds in the resultant list, or negative on error.
*/
API_EXPORTED size_t fp_get_pollfds(struct fp_pollfd **pollfds)
API_EXPORTED ssize_t fp_get_pollfds(struct fp_pollfd **pollfds)
{
const struct libusb_pollfd **usbfds;
const struct libusb_pollfd *usbfd;
struct fp_pollfd *ret;
size_t cnt = 0;
ssize_t cnt = 0;
size_t i = 0;
usbfds = libusb_get_pollfds(fpi_usb_ctx);

View File

@@ -1,5 +1,5 @@
project('libfprint', [ 'c', 'cpp' ],
version: '0.8.1',
version: '0.8.2',
license: 'LGPLv2.1+',
default_options: [
'buildtype=debugoptimized',