Bastien Nocera
aec65777a7
nbis: Update links to new website
2018-06-03 00:30:10 +02:00
Bastien Nocera
31bad8ddd2
build: Fix fprint.h install destination
...
Since the port to meson, fprint.h was installing to $includedir instead
of $includedir/libfprint/
2018-05-31 14:35:16 +02:00
Bastien Nocera
79d65c907f
build: Add missing X11 deps for the examples
2018-05-31 12:30:48 +02:00
Bastien Nocera
92231d984f
build: Add some missing build essentials
2018-05-31 12:23:30 +02:00
Bastien Nocera
2fbc77955e
build: Add CI
...
Barebones, just compiles libfprint.
2018-05-31 12:18:17 +02:00
Bastien Nocera
c91819f551
lib: Remove drv->close absence support in fp_async_dev_close()
...
The driver will at least need to close its hardware resources, and
free memory, so it must have had one.
This case was never actually used as can be seen from the fact that
we would assert in fpi_drvcb_close_complete() if the state was wrong
but never set it to the expected value.
2018-05-31 11:06:31 +02:00
Bastien Nocera
b3f6ff5a36
lib: Add guard to async functions
...
To avoid having NULL devices being passed dereferenced.
2018-05-31 11:06:31 +02:00
Bastien Nocera
52f84bee3c
vfs5011: Error out when no lines were captured
...
Which avoids passing zero lines to fpi_assemble_lines()
"gmem.c:130: failed to allocate 18446744073709551612 bytes"
#3 0x00007fe4f6ef428f in g_log (log_domain=log_domain@entry=0x7fe4f6f3506e "GLib", log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x7fe4f6f3e610 "%s: failed to allocate %lu bytes") at gmessages.c:1398
#4 0x00007fe4f6ef2ac4 in g_malloc0 (n_bytes=n_bytes@entry=18446744073709551612) at gmem.c:129
#5 0x00007fe4f8052020 in median_filter (filtersize=25, size=-1, data=0x0) at assembling.c:309
#6 fpi_assemble_lines (ctx=ctx@entry=0x7fe4f82ac3c0 <assembling_ctx>, lines=0x0, lines_len=0) at assembling.c:389
#7 0x00007fe4f805f3db in submit_image (ssm=ssm@entry=0x16c3cba360, data=data@entry=0x16c3cb9cc0) at drivers/vfs5011.c:412
See https://bugzilla.redhat.com/show_bug.cgi?id=1484812
Closes : #42
2018-05-31 11:08:41 +02:00
Bastien Nocera
dda6857fee
assembling: Add guards to fpi_assemble_lines()
...
With the goal of not crashing when we try to malloc MAXINT bytes of RAM.
See https://bugzilla.redhat.com/show_bug.cgi?id=1484812
Closes : #42
2018-05-31 11:06:31 +02:00
Bastien Nocera
db34837d2d
lib: Simplify device discovery
...
Use GPtrArray instead of open-coding a NULL terminated array.
https://bugs.freedesktop.org/show_bug.cgi?id=106279
2018-05-29 13:45:27 +02:00
Bastien Nocera
ba49677794
vfs0050: Rename "udev" to "usb_dev"
...
To reduce confusion with possible future udev usage.
2018-05-29 13:37:19 +02:00
Bastien Nocera
1a376c1bfa
lib: Remove 2 more functions from the drivers API
2018-05-29 13:34:18 +02:00
Bastien Nocera
ef807d9d0e
lib: s/array_n_elements/G_N_ELEMENTS/
2018-05-29 13:34:18 +02:00
Bastien Nocera
2a4893d946
lib: fp_imgdev_*() functions are only used in drivers
2018-05-29 13:34:18 +02:00
Bastien Nocera
cee061b363
lib: fpi_ssm_start_subsm() is only used in drivers
2018-05-29 13:34:18 +02:00
Bastien Nocera
1bbdf304ab
lib: Remove never defined fpi_ssm_has_completed()
2018-05-29 13:34:18 +02:00
Bastien Nocera
6155068f9e
lib: Split off some fp_img related functions
...
Some are internal, some are for drivers.
2018-05-29 13:34:18 +02:00
Bastien Nocera
0c4e3bb1c4
lib: Remove drivers definitions from drivers API
2018-05-29 13:34:18 +02:00
Bastien Nocera
4547ff0c19
lib: Remove a number of data types from drivers API
...
They're unused in drivers.
2018-05-29 13:34:18 +02:00
Bastien Nocera
b7cce4d91d
lib: Make fp_minutiae opaque
...
And fp_minutia private.
2018-05-29 13:34:18 +02:00
Bastien Nocera
475250ce71
lib: Split off some polling related functions
2018-05-29 13:34:18 +02:00
Bastien Nocera
f40f231a63
lib: Make fp_img_dev structure opaque
2018-05-29 13:34:18 +02:00
Bastien Nocera
d83d92adf2
lib: Make fp_dev structure opaque
2018-05-29 13:34:18 +02:00
Bastien Nocera
d15282bff1
lib: Remove minutiae utils from internal header
...
It's only used by drivers.
2018-05-29 13:34:18 +02:00
Bastien Nocera
00637c4f0b
lib: Remove fprint_get_drivers() from drivers API
...
Drivers don't need to get a list of drivers.
2018-05-29 13:34:18 +02:00
Bastien Nocera
2e035a7f45
lib: Make fpi_ssm opaque for drivers
...
We shouldn't access fpi_ssm struct fields directly in drivers, so add
accessor and setter functions for the common uses.
2018-05-29 13:34:18 +02:00
Bastien Nocera
17577175f8
lib: Remove fpi_driver_to_img_driver() from drivers API
...
It's only used internally to the library.
2018-05-29 13:34:18 +02:00
Bastien Nocera
933fab6ed4
lib: Remove array_n_elements() from internal header
...
It's unused.
2018-05-29 13:34:18 +02:00
Bastien Nocera
7e5661caff
lib: Don't include assembling.h in internal header
...
It's not needed.
2018-05-29 13:34:18 +02:00
Bastien Nocera
19dfb138a6
drivers: Use new drivers_api.h in drivers
2018-05-29 13:34:18 +02:00
Bastien Nocera
0930f2614c
lib: Use public header in helper files
...
aeslib.h and assembling.h don't need access to internal data structures,
so make them include the public fprint.h rather than the internal header
fp_internal.h.
2018-05-29 13:34:18 +02:00
Bastien Nocera
1b20521e5c
lib: Add drivers_api.h file
...
This will hide library internals, for the purpose of making the drivers
API documentable.
2018-05-29 13:34:18 +02:00
Bastien Nocera
0e351db91a
lib: Fix new BUG_ON() implementation again
...
This time, the macro didn't wrap the condition, resulting in calls
like BUG_ON(size > 100) being expanded to g_assert(!size > 100), when
what we wanted was BUG_ON(!(size > 100)).
See 9cca501650 ,
ff09456cf5 , and egg on my face.
2018-05-25 17:38:40 +02:00
Bastien Nocera
9cca501650
lib: Fix new BUG_ON() implementation
...
A thinko reversed the meaning of the BUG_ON() condition. This fixes
the inverted implementation in commit
ff09456cf5 .
2018-05-25 16:12:29 +02:00
Bastien Nocera
2481cbe4ab
poll: Add some details about how mainloop integration works
2018-05-25 15:58:29 +02:00
Bastien Nocera
bc3959d1e0
lib: Fix internal deprecation warning
...
Remove deprecation warning that comes from an internal function, it
serves no purpose, and the function itself is deprecated.
Follow-up from commit 1f0079a274 .
2018-05-25 13:45:13 +02:00
Bastien Nocera
1ac815e457
examples: Fix integer overflow warnings
2018-05-25 13:40:33 +02:00
Bastien Nocera
55b83062d0
img: Fix fd leaks
...
Spotted by maddin200@aol.com
https://bugs.freedesktop.org/show_bug.cgi?id=90197
2018-05-25 13:30:35 +02:00
Bastien Nocera
bc30a3d2e5
aes2501: Fix state machine never using "init_3" state
...
This fixes this warning by the same token:
drivers/aes2501.c:671:34: warning: ‘init_3’ defined but not used [-Wunused-const-variable=]
https://bugs.freedesktop.org/show_bug.cgi?id=105429
2018-05-25 13:21:17 +02:00
Bastien Nocera
ff5de4ff03
lib: Replace open-coded array_n_elements()
...
Replace it with glib's version, which already exists.
https://bugs.freedesktop.org/show_bug.cgi?id=106280
2018-05-25 13:20:34 +02:00
Bastien Nocera
f433a4d67c
upekts: Fix compilation warning
...
libfprint/drivers/upekts.c: In function ‘alloc_send_cmd_transfer’:
libfprint/drivers/upekts.c:161:2: warning: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
strncpy(buf, "Ciao", 4);
^~~~~~~~~~~~~~~~~~~~~~~
Replace with memcpy() to only copy the 4 bytes we need.
https://bugs.freedesktop.org/show_bug.cgi?id=106281
2018-05-25 13:19:31 +02:00
Bastien Nocera
994061af44
drivers: Simplify headers
...
Remove all the headers already included through "fp_internal.h" such as
<libusb.h> and <errno.h>, include "assembling.h" and "driver_ids.h" there
as well to avoid doing it in (almost) every driver.
2018-05-24 17:02:15 +02:00
Bastien Nocera
501020921e
vfs301_proto: Use GLib helpers
...
No need to roll out own min() implementation, or use the bare assert().
2018-05-24 17:00:17 +02:00
Bastien Nocera
53c09405b2
etes603: Use GLib's g_assert()
...
Instead of requiring assert.h to be included.
2018-05-24 16:57:14 +02:00
Bastien Nocera
1f0079a274
data: Mark all the fp_dscv_print functions as deprecated
...
As this is pretty much copy/pasted in fprintd, and should instead be
implemented by whatever system actually stores the data, rather than
in a generic but not quite "fits-all-purpose" way.
https://bugs.freedesktop.org/show_bug.cgi?id=106550
2018-05-24 13:21:40 +02:00
Bastien Nocera
15afe43cf0
examples: Replace deprecated fp_set_debug()
2018-05-24 12:43:53 +02:00
Bastien Nocera
eb8f7ba3b2
lib: Mark fp_set_debug() as deprecated
...
As per the documentation.
2018-05-24 12:42:18 +02:00
Bastien Nocera
901a6f7fed
lib: Add macro for deprecated functions
2018-05-24 12:41:35 +02:00
Bastien Nocera
fc92f62136
build: Remove the need to modify sources for new drivers
...
Instead of having to modify both fp_internal.h to list each driver
definition structure, and core.c to add those drivers to arrays we
can loop over, generate both of those using meson.
2018-05-24 12:23:39 +02:00
Bastien Nocera
ff09456cf5
lib: Use g_assert* to implement BUG() and BUG_ON() assertions
2018-05-23 19:14:33 +02:00
Bastien Nocera
32fcfde86b
lib: Use GLib and libusb directly for debug output
...
Use GLib internally to output debug information, and tell about
libusb's LIBUSB_DEBUG envvar for libusb debug.
fp_set_debug() is now a no-op.
https://bugs.freedesktop.org/show_bug.cgi?id=106552
2018-05-23 19:13:08 +02:00
Bastien Nocera
363a1b3371
lib: Replace empty fp_dbg() calls
...
GLib won't like them, so use G_DEBUG_HERE() instead.
2018-05-23 19:11:07 +02:00
Bastien Nocera
c376c6fb02
lib: Fix type mismatch warnings in debug output
2018-05-23 19:11:05 +02:00
Bastien Nocera
8e6e23b8d0
build: Always enable debugging logging
...
We shouldn't need to specifically enable debug logging to get useful
data out of a compiled libfprint either, so always enable debugging
output. It will still be switched off at runtime, by default.
2018-05-23 19:11:02 +02:00
Bastien Nocera
63e5d56441
build: Always allow switching log level at runtime
...
There are no parts of libfprint that are so resource intensive that we'd
want to disable logging. This avoids (hopefully rare) cases where
compiled versions of libfprint are distributed with logging completely
disabled, and thus can't be debugged.
2018-05-23 19:10:58 +02:00
Bastien Nocera
e9bfd943fc
docs: Mark a few FP_VERIFY_MATCH as constant
...
Add "%" prefix to mark it as a constant in the docs.
2018-05-23 15:18:34 +02:00
Bastien Nocera
614e2286c2
docs: Fix typo in fp_enroll_finger_img() API docs
...
Missing ":" after argument name.
2018-05-23 15:18:34 +02:00
Bastien Nocera
768a74c4bf
docs: Remove transfer information from fp_dev_open()
...
There's no GObject usage in the public API.
2018-05-23 15:18:34 +02:00
Bastien Nocera
612e9e11de
docs: Document async function callbacks
2018-05-23 15:18:34 +02:00
Bastien Nocera
06c72d54be
poll: Add missing API docs for polling functions
2018-05-23 15:18:34 +02:00
Bastien Nocera
be68bacc94
lib: Merge two other async callback types
...
Merge fp_capture_cb and fp_verify_cb.
https://bugs.freedesktop.org/show_bug.cgi?id=106551
2018-05-23 15:18:34 +02:00
Bastien Nocera
317d7bc988
lib: Simplify fp_*_stop_cb callback definitions
...
They're all the same, so merge them into a single fp_operation_stop_cb.
https://bugs.freedesktop.org/show_bug.cgi?id=106551
2018-05-23 13:39:10 +02:00
Bastien Nocera
b44e417bca
docs: Fix '\sa' doxygen references
2018-05-23 13:39:10 +02:00
Bastien Nocera
9d67ce484d
lib: Make inline functions real functions
...
Otherwise they will not be parsed by gtk-doc and documented.
2018-05-23 13:39:10 +02:00
Bastien Nocera
78b8602cf6
lib: Make fp_minutia an opaque structure
...
Nothing uses the elements of the structure, so make it opaque.
2018-05-23 13:39:10 +02:00
Bastien Nocera
83a0a7681b
img: Make fpi_img_detect_minutiae() static
...
It's unused outside img.c, so mark it as static.
2018-05-23 13:39:10 +02:00
Bastien Nocera
c5e0e41ce7
docs: Add documentation for opaque structures
2018-05-23 13:39:00 +02:00
Bastien Nocera
b3fe4a1e91
docs: Update API documentation
...
Fixes to layout, dead links, typography, and more.
Thanks to Benjamin Berg <bberg@redhat.com > for the thorough review
2018-05-18 05:51:58 +02:00
Bastien Nocera
f59bf389d9
INSTALL: Update for Meson
2018-05-18 01:16:30 +02:00
Bastien Nocera
231b8f9f92
doc: Port from Doxygen to gtk-doc
...
Split the introduction into separate chapters, add filler documentation
for async functions, fix mismatched function arguments.
2018-05-17 17:39:51 +02:00
Bastien Nocera
dac153d24a
build: Port to meson
...
And remove the autotools. Faster, cleaner.
https://bugs.freedesktop.org/show_bug.cgi?id=106514
2018-05-15 10:46:54 +02:00
Bastien Nocera
3661d146a7
drivers: Remove UPEKE2 driver
...
The device is already handled by upektc_img driver, and its sources
still exist in git if needed.
https://bugs.freedesktop.org/show_bug.cgi?id=106514
2018-05-15 10:46:54 +02:00
Bastien Nocera
3bf55a3e07
examples: Fix compile-time warning
...
Fix "function declaration isn’t a prototype" warning
2018-05-14 17:35:51 +02:00
Bastien Nocera
5226467fc2
build: Make NSS (and URU4000) driver optional
...
In case NSS isn't available.
https://bugs.freedesktop.org/show_bug.cgi?id=106278
2018-05-11 11:13:25 +02:00
Bastien Nocera
76269decdd
aes4000: Fix possible crash if USB init fails
...
The code was indented, but only the first call was actually in the
conditional, which meant that initialisation carried on as normal on top
of a failed USB device. Exit early and remove the conditional to fix
this.
https://bugzilla.gnome.org/show_bug.cgi?id=98594
2016-11-05 00:13:51 +01:00
Bastien Nocera
8454a25ecf
aes3500: Fix possible crash if USB init fails
...
The code was indented, but only the first call was actually in the
conditional, which meant that initialisation carried on as normal on top
of a failed USB device. Exit early and remove the conditional to fix
this.
2016-11-05 00:11:30 +01:00
Bastien Nocera
a0bbbd7d32
drivers: Print USB error when libusb_claim_interface() fails
...
https://bugs.freedesktop.org/show_bug.cgi?id=98594
2016-11-05 00:10:17 +01:00
Bastien Nocera
12f6dae8cd
build: Fix 9570c36 on Debian
...
Debian's ash doesn't implement pushd/popd.
2016-11-03 14:05:46 +01:00
Bastien Nocera
9570c36fd4
build: Fix running autogen.sh out-of-tree
2016-07-19 11:18:58 +02:00
Bastien Nocera
487dae0d2f
Work-around kernel's lack of USB PM
...
The device is already supported by the vfs5011 driver and non-
blacklisted, so will show up in the udev rules, but for ease of
backporting to older versions, add it to the whitelist anyway.
https://bugzilla.redhat.com/show_bug.cgi?id=1173367
2016-04-12 16:39:39 +02:00
Bastien Nocera
f1fdd71613
rules: Add driver name to the USB properties
...
Makes it easier to see which driver is being used.
2015-03-15 23:13:08 +01:00
Bastien Nocera
bb66780cb5
build: Document why some drivers are disabled
...
This avoids confusion when looking at the build logs
2015-03-15 23:10:03 +01:00
Bastien Nocera
ee32166267
0.6.0
2015-02-03 17:36:32 +01:00
Bastien Nocera
9e2f8b5e75
0.5.1
2013-08-11 17:53:21 +02:00
Bastien Nocera
c14ebd8b63
Add MS keyboard to the suspend blacklist
...
045e:00bb isn't a stand-alone fingerprint reader, but a keyboard
with a reader integrated.
https://bugs.freedesktop.org/show_bug.cgi?id=66659
2013-07-25 12:29:53 +02:00
Bastien Nocera
a6339a30ef
Fix udev rules printing
...
The blacklisted devices weren't correctly checked for past the first
item, as we weren't using the right index to get the product ID
from the ID table.
2013-07-25 12:29:29 +02:00
Bastien Nocera
f3dd55815e
lib: Use g_malloc0 instead of g_malloc+memset
2013-06-26 14:21:33 +02:00
Bastien Nocera
02509e1073
build: udev rules must be created when building from git
...
https://bugs.freedesktop.org/show_bug.cgi?id=59076
2013-01-07 12:36:45 +01:00
Bastien Nocera
a5ec0b30e1
0.5.0
2012-12-03 16:28:00 +01:00
Bastien Nocera
29cf86a02e
build: Fix configure-time warning
...
Due to missing quotes
2012-12-03 16:28:00 +01:00
Bastien Nocera
7892c943e6
build: Create .tar.xz distribution by default
2012-12-03 16:28:00 +01:00
Bastien Nocera
258ac2d4da
build: Build all the drivers by default
2012-12-01 15:10:13 +01:00
Bastien Nocera
9e92d4cf2c
examples: Fix compile-time warnings
...
A few signedness problems.
2012-11-06 09:30:40 +01:00
Bastien Nocera
9e10edd422
aes2501: Add year 2008 to the copyright.
...
https://bugs.freedesktop.org/show_bug.cgi?id=56715#c7
2012-11-05 19:52:46 +01:00
Bastien Nocera
0f7ad00fc4
HACKING: Update with bugzilla link
2012-10-15 11:46:03 +02:00
Bastien Nocera
132b178304
lib: Add driver names to the udev rules
2012-08-28 20:02:17 +01:00
Bastien Nocera
3d222ddda7
lib: Fix whitespace errors
2012-08-28 19:45:08 +01:00
Bastien Nocera
080c414ce9
build: Whitespace fixes in configure.ac
2012-08-28 19:45:08 +01:00
Bastien Nocera
3b409c767c
build: Allow disabling the update of udev rules
...
We can only create the udev rules file when we're not cross-compiling,
so allow people to disable updating the file when building from
tarballs.
If you run with --enable-udev-rules=no and the
60-fprint-autosuspend.rules doesn't exist, you're on your own.
2012-08-14 15:19:35 +01:00
Bastien Nocera
d05c69698c
build: Fix distcheck'ing not working
...
We need to be able to override the udev rules directory for
distchecking to work.
2012-08-14 15:12:20 +01:00