mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Fix examples not working
Remove the sanity check added in commit b1afa9d, having a poll setup
isn't necessary to use timeouts, as long as only sync functions are
used.
Closes: #139
This commit is contained in:
@@ -91,8 +91,6 @@ struct fpi_timeout {
|
||||
char *name;
|
||||
};
|
||||
|
||||
static gboolean fpi_poll_is_setup(void);
|
||||
|
||||
static int timeout_sort_fn(gconstpointer _a, gconstpointer _b)
|
||||
{
|
||||
fpi_timeout *a = (fpi_timeout *) _a;
|
||||
@@ -167,7 +165,6 @@ fpi_timeout *fpi_timeout_add(unsigned int msec,
|
||||
int r;
|
||||
|
||||
g_return_val_if_fail (dev != NULL, NULL);
|
||||
g_return_val_if_fail (fpi_poll_is_setup(), NULL);
|
||||
|
||||
fp_dbg("in %dms", msec);
|
||||
|
||||
@@ -487,12 +484,6 @@ void fpi_poll_exit(void)
|
||||
libusb_set_pollfd_notifiers(fpi_usb_ctx, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
fpi_poll_is_setup(void)
|
||||
{
|
||||
return (fd_added_cb != NULL && fd_removed_cb != NULL);
|
||||
}
|
||||
|
||||
void
|
||||
fpi_timeout_cancel_all_for_dev(struct fp_dev *dev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user