aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/usbhidaction
diff options
context:
space:
mode:
authorMatthew N. Dodd <mdodd@FreeBSD.org>2003-04-10 08:06:56 +0000
committerMatthew N. Dodd <mdodd@FreeBSD.org>2003-04-10 08:06:56 +0000
commit6ec73e0e901e337dfc14e42e38aa704dd9eb04cf (patch)
treee9aab7997f810bf61a609817792ae125fe7a5d57 /usr.bin/usbhidaction
parent81f290a510fda1df4359390049a935720430a774 (diff)
downloadsrc-6ec73e0e901e337dfc14e42e38aa704dd9eb04cf.tar.gz
src-6ec73e0e901e337dfc14e42e38aa704dd9eb04cf.zip
Notes
Diffstat (limited to 'usr.bin/usbhidaction')
-rw-r--r--usr.bin/usbhidaction/usbhidaction.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/usbhidaction/usbhidaction.c b/usr.bin/usbhidaction/usbhidaction.c
index b05de5ba7e84..e79011c06b66 100644
--- a/usr.bin/usbhidaction/usbhidaction.c
+++ b/usr.bin/usbhidaction/usbhidaction.c
@@ -204,7 +204,7 @@ main(int argc, char **argv)
if (cmd->value != val && cmd->anyvalue == 0)
goto next;
if ((cmd->debounce == 0) ||
- (cmd->debounce && ((cmd->lastseen == -1) ||
+ ((cmd->debounce == 1) && ((cmd->lastseen == -1) ||
(cmd->lastseen != val)))) {
docmd(cmd, val, dev, argc, argv);
goto next;
@@ -415,6 +415,8 @@ parse_conf(const char *conf, report_desc_t repd, int reportid, int ignore)
foundhid:
hid_end_parse(d);
+ cmd->lastseen = -1;
+ cmd->lastused = -1;
cmd->item = h;
cmd->name = strdup(name);
cmd->action = strdup(action);