diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-10-14 17:02:43 +1030 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-10-14 17:07:09 +1030 |
commit | 0089d931ac5fb290c82908da652b28c8b515d449 (patch) | |
tree | 22448a826b1ff206673f387fa39ba3309b077027 /src | |
parent | 0f5a5ac09ebc89e984b72d395475bb9f412e240c (diff) |
Fix "Device reopened after N attempts" message.
Diffstat (limited to 'src')
-rw-r--r-- | src/evdev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c index 558b996..aafbbe5 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -185,12 +185,10 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg) if (pInfo->fd != -1) { - pEvdev->reopen_left = 0; - if (EvdevCacheCompare(pInfo, TRUE) == Success) { xf86Msg(X_INFO, "%s: Device reopened after %d attempts.\n", pInfo->name, - pEvdev->reopen_attempts - pEvdev->reopen_left); + pEvdev->reopen_attempts - pEvdev->reopen_left + 1); EvdevOn(pInfo->dev); } else { @@ -200,6 +198,7 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg) close(pInfo->fd); pInfo->fd = -1; } + pEvdev->reopen_left = 0; return 0; } |