diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-02-23 01:12:29 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-02-23 01:12:29 +0100 |
commit | 7ded2e28f2a0e614a3981aeb5b74aaeadf6ad9db (patch) | |
tree | 1fff4ae5c444ab8fbd68d390b34f5bc2f3f934cf | |
parent | 21bc923aa35d455cdef1607eb7022608c705c9f3 (diff) |
ask-password: fix handling of timeouts when waiting for password
-rw-r--r-- | src/ask-password-api.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ask-password-api.c b/src/ask-password-api.c index cd663ae09c..845517a690 100644 --- a/src/ask-password-api.c +++ b/src/ask-password-api.c @@ -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; |