Commit 7ded2e28 authored by Lennart Poettering's avatar Lennart Poettering
Browse files

ask-password: fix handling of timeouts when waiting for password

parent 21bc923a
......@@ -111,7 +111,7 @@ int ask_password_tty(
y = now(CLOCK_MONOTONIC);
if (y > until) {
r = -ETIMEDOUT;
r = -ETIME;
goto finish;
}
......@@ -373,7 +373,7 @@ int ask_password_agent(
goto finish;
}
if ((k = poll(pollfd, _FD_MAX, until-t/USEC_PER_MSEC)) < 0) {
if ((k = poll(pollfd, _FD_MAX, (until-t)/USEC_PER_MSEC)) < 0) {
if (errno == EINTR)
continue;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment