mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
lib: Use timeout name in debug messages when available
This commit is contained in:
@@ -250,10 +250,17 @@ static int get_next_timeout_expiry(struct timeval *out,
|
|||||||
*out_timeout = next_timeout;
|
*out_timeout = next_timeout;
|
||||||
|
|
||||||
if (timercmp(&tv, &next_timeout->expiry, >=)) {
|
if (timercmp(&tv, &next_timeout->expiry, >=)) {
|
||||||
|
if (next_timeout->name)
|
||||||
|
fp_dbg("first timeout '%s' already expired", next_timeout->name);
|
||||||
|
else
|
||||||
fp_dbg("first timeout already expired");
|
fp_dbg("first timeout already expired");
|
||||||
timerclear(out);
|
timerclear(out);
|
||||||
} else {
|
} else {
|
||||||
timersub(&next_timeout->expiry, &tv, out);
|
timersub(&next_timeout->expiry, &tv, out);
|
||||||
|
if (next_timeout->name)
|
||||||
|
fp_dbg("next timeout '%s' in %ld.%06lds", next_timeout->name,
|
||||||
|
out->tv_sec, out->tv_usec);
|
||||||
|
else
|
||||||
fp_dbg("next timeout in %ld.%06lds", out->tv_sec, out->tv_usec);
|
fp_dbg("next timeout in %ld.%06lds", out->tv_sec, out->tv_usec);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user