Age | Commit message (Collapse) | Author | Files | Lines |
|
API consumers should fetch the persistent data when they are done and
store it to disk. It is undefined when this data is updated by the
driver, but in general, it should only be updated once the first time
a device is used.
|
|
Signed-off-by: hermanlin <herman.lin@emc.com.tw>
|
|
Drop re-definition of stderr. There's no need for this anywhere
(including glibc). This breaks in particular on musl because
stderr (and stdin) are both const, and macros unlike in glibc.
Bug: https://bugs.gentoo.org/853811
|
|
Otherwise we cannot recover from the error by doing a device reset.
|
|
When opening the device, query the stored prints. This should usually
always succeed (and it should be fast). If it fails, then we are very
likely dealing with a corrupted template storage on the device. In that
case, emit the command to clear the storage in order to reset the device
and get it back into a usable state.
|
|
It is completely fine for a capture to have a low quality or fail. No
need to warn about this. Main reason to remove it though is so that
recordings that contain such a message do not trigger a failure.
|
|
|
|
The mod_full_brace_if_chain option needs an integer (we want method 1)
rather than a boolean.
|
|
|
|
|
|
|
|
|
|
This made the flatpak build fail.
|
|
If we delayed the suspend(/resume) call, then the circumstances may have
changed. In particular, an active action may have completed already
which means that the driver handler should not be called anymore.
|
|
These delayed calls are pushed into the mainloop for consistency.
However, they should run immediately and not be delayed, as such, it
makes sense to run them at a higher priority.
This actually solves an issue inside the CI where an URB reply is played
back even though it should be cancelled by the client.
|
|
We re-aquire the critical section at the start of the callback, however,
it needs to be dropped again (or not taken) if the interrupt transfer is
resubmitted.
|
|
|
|
The kernel caches URBs to get descriptor values. Doing a reset before
starting the record ensures that we will see any descriptor reads in the
usbmon trace and can therefore correctly replay them (possibly not true
if they happen multiple times).
|
|
This avoids spurious warnings on e.g. SELinux enabled systems.
|
|
Reported as working with this config in
https://github.com/mincrmatt12/elan-spi-fingerprint/issues/11.
|
|
|
|
|
|
Having this should at least give us a slightly better idea about the
version that the user has installed. Obviously it is still not very
accurate (maybe a git hash would be good if available?), but it should
still be helpful overall.
|
|
|
|
|
|
The code is correct, but gcc thinks the pointer is still NULL after the
call. As obvious workaround don't seem to work, just disable the warning
for now.
|
|
|
|
|
|
Just a minor change, but makes the file a bit more readable.
|
|
|
|
The internal storage of this device can get messed up by other operating
systems, so it's handy to be able to clear it.
I'm not 100% sure whether the commands I've sent to the device are
exactly what is supposed to be used (just a guess), but it did seem to
work, and it even fixed another issue I had.
|
|
The API should return the recognized print, even if none of the prints
given in the gallery (or the one passed to verify) matched. Without this
the garbage-collection of left-over prints does not work, causing issues
after reinstall.
Fixes: #444
|
|
|
|
Prints may have an invalid date. Extend the checks so that this is also
caught in addition to a NULL date.
|
|
Otherwise you can't tell from the log whether parsing the body or header
failed.
|
|
In commit 5c28654d9 ("goodixmoc: Fix print template parsing") the length
check for the verify and duplicate check responses by requiring two
extra bytes at the end of the message.
There were also issues in other places where the length was not checked
correctly, including a scenario that could cause a read beyond the end
of the buffer.
Related: #444
|
|
|
|
|
|
New values taken from a newer version of the official driver.
|
|
* Allow FPI_PRINT_NBIS to be extended rather than overridden if a user
supplies an existing FpPrint template with data;
* Prints will only be extended if a device has the required feature.
For image-based devices this feature is added by default since they
typically do not have storage (this can be overridden at the child
class level).
Extending an existing FpPrint requires passing a template print with
existing data during the enrollment process. This is done because the
caller is responsible for maintaining the fingerprint database and doing
the necessary deserialization operations if needed. The existing
example program is updated to show how to do that.
|
|
|
|
Otherwise tightly looping SSMs (primarily SPI transfers), will flood the
logs in inappropriate ways.
|
|
Two of the printed variables were only calculated after the message was
printed, making the logged information less useful than it could be.
|
|
This ensures that we have processed all hotplug events before
considering enumeration to be complete. This is important due to USB
persist being turned off. At resume time, devices will disappear and
immediately re-appear. In this situatoin, enumerate could first see the
old state with a removed device resulting in it to not be discovered.
As a hotplug event is semingly emitted by the kernel immediately, we
can simply make sure to process this hotplug event before returning
from enumerate.
Closes: fprintd#119
|
|
Added description and fixed incorrect name in comment, so now gtkdoc
actually shows useful information.
|
|
|
|
|
|
|
|
|
|
The length is only a single byte in the transfer. However, the struct
had a uint32_t in that place, breaking the sizeof() calculation and
seemingly creating issues for certain lengths of user id strings (which
depend on the username).
Fix this by changing the type to uint8_t. Also add the initial 0x43
prefix byte and a byte of apparent padding that the struct contains.
Leave the two reserved bytes at the end, as they seem to actually have a
meaning (i.e. they are seemingly send in listings).
This effectively makes the struct one byte smaller, bringing it down to
127 bytes from 128 bytes.
Closes: #428, #404
|