timer: always restart the timer loop when we called one of them
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 17 Jul 2017 02:30:25 +0000 (12:30 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 25 Jul 2017 08:28:18 +0000 (18:28 +1000)
commit6d0edf9d07379082d9a2c66c71e929ad510b29d2
tree5bdf12b98fae49ce589f7e355aaae527c01262ad
parent696fdff247453e60e259349d0125f67856361b54
timer: always restart the timer loop when we called one of them

If a timer_func causes the removal or addition of a different timer, our tmp
pointer from the list_for_each_safe may not be valid anymore.

This was triggered by having the debounce code trigger a middle button state
change, which caused that timer to be cancelled.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/timer.c