From 14606fa7fbf1cc0c40dbd2dd12ab77a8c590c039 Mon Sep 17 00:00:00 2001 From: Drew Fisher Date: Fri, 11 Nov 2011 00:29:02 -0800 Subject: [PATCH] touchmouse.c: reset the decoder state when a decode error arises. Signed-off-by: Drew Fisher --- src/touchmouse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/touchmouse.c b/src/touchmouse.c index 30c0189..765802d 100644 --- a/src/touchmouse.c +++ b/src/touchmouse.c @@ -395,6 +395,7 @@ int touchmouse_process_events_timeout(touchmouse_device *dev, int milliseconds) } if (res == DECODER_ERROR) { fprintf(stderr, "Caught error in decoder, aborting!\n"); + reset_decoder(dev); return -1; } res = process_nybble(dev, (r->data[t] & 0xf0) >> 4); @@ -410,6 +411,7 @@ int touchmouse_process_events_timeout(touchmouse_device *dev, int milliseconds) } if (res == DECODER_ERROR) { fprintf(stderr, "Caught error in decoder, aborting!\n"); + reset_decoder(dev); return -1; } } -- 2.39.5