summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-10-14 17:02:43 +1030
committerPeter Hutterer <peter.hutterer@redhat.com>2008-10-17 11:18:22 +1030
commitd73a1732c6a2c093f76bdc5f32b3a53fdef92b15 (patch)
treefb0d15b65c4e6a03df87b9dca10a38f702e19a4e
parent8c332a836783b4f18b992253f4a94b694c9d0cf1 (diff)
Fix "Device reopened after N attempts" message.
(cherry picked from commit 0089d931ac5fb290c82908da652b28c8b515d449)
-rw-r--r--src/evdev.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 6958578..019d70d 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -176,12 +176,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
{
@@ -191,6 +189,7 @@ EvdevReopenTimer(OsTimerPtr timer, CARD32 time, pointer arg)
close(pInfo->fd);
pInfo->fd = -1;
}
+ pEvdev->reopen_left = 0;
return 0;
}