Bastien Nocera
0ddd11f81b
lib: Fix unintialised variable warning in fp_get_next_timeout()
...
libfprint/fpi-poll.c:398:11: warning: The left operand of '==' is a garbage value
else if (timercmp(&fprint_timeout, &libusb_timeout, <))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/sys/time.h:162:17: note: expanded from macro 'timercmp'
(((a)->tv_sec == (b)->tv_sec) ? \
~~~~~~~~~~~ ^
2018-12-12 15:47:29 +01:00
Bastien Nocera
511e164f17
lib: Add @short_description for all the sections
...
So gtk-doc doesn't warn about them any more.
2018-11-25 12:42:11 +00:00
Bastien Nocera
11b11a9d71
lib: Fix get_next_timeout_expiry
...
If get_next_timeout_expiry() fails, and libusb_get_next_timeout()
has no timeouts or failed, fprint_timeout will not be set, and
we cannot compare it to libusb_timeout.
Exit early if both failed or have empty queues.
2018-11-13 11:54:41 +01:00
Bastien Nocera
5d4a5981d0
lib: Make fpi_poll_is_setup() private
...
As it's not used in other parts of the library after the changes in
commit 422f81b
.
2018-11-09 13:33:02 +01:00
Bastien Nocera
b1afa9da5d
lib: No mainloop, no timeouts either
2018-10-23 10:59:15 +02:00
Bastien Nocera
97d0a6dfe6
lib: Add fpi_poll_is_setup() sanity check
...
This checks whether polling was correctly setup for integration with a
mainloop.
2018-10-23 10:59:15 +02:00
Bastien Nocera
a54d020c97
lib: Make fp_get_pollfds() fail when fp_init() wasn't called
...
So things can't be called out-of-order.
2018-10-23 10:59:15 +02:00
Bastien Nocera
7cfe20e07f
lib: Fix gtk-doc warning
...
warning: no link for: "timeval" -> (<code class="literal">timeval</code>)
2018-09-27 16:08:21 +02:00
Bastien Nocera
ebd96f892e
lib: Make fpi_timeout_add() never fail
...
It will now assert if the monotonic clock isn't available. If that's the
case, we'll have bigger problems anyway.
2018-09-27 15:14:05 +02:00
Bastien Nocera
948a67a51f
lib: Add internal fpi_timeout_cancel_all_for_dev()
...
This will be used to disable all timeouts for a device that's about
to be closed, and freed.
2018-09-27 14:49:50 +02:00
Bastien Nocera
de79609550
lib: Use timeout name in debug messages when available
2018-09-27 14:49:41 +02:00
Bastien Nocera
d18e10535e
lib: Add a way to name timeouts
...
To make it easier to print debug information about where timeouts are
coming from.
2018-09-27 14:49:41 +02:00
Bastien Nocera
2954583373
lib: Fix memory leak in fpi_poll_exit()
...
The active_timers list was freed, but not the elements themselves.
2018-09-27 14:36:06 +02:00
Bastien Nocera
f68e7fcb9f
lib: Add fp_dev argument to timeout callback
...
To cut down on the fpi_ssm_get_user_data() usage again.
2018-09-18 20:00:59 +02:00
Bastien Nocera
2946dabd24
lib: Typedef fpi_timeout
2018-09-05 17:49:02 +02:00
Bastien Nocera
969eefc81f
lib: Add fpi_timeout API documentation
2018-09-05 17:48:43 +02:00
Bastien Nocera
efee7262b6
lib: Split off timeout helpers
...
And rename poll.c to fpi-poll.c
2018-09-05 17:15:20 +02:00