diff --git a/debian/changelog b/debian/changelog index 007bf0e..7ab5203 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +g15daemon (1.9.5.3-11) unstable; urgency=medium + + * Reinitialize on eny error code, not only on a negative one. + + -- Alexander Ponyatykh Sun, 17 Nov 2019 15:24:00 +0300 + g15daemon (1.9.5.3-10) unstable; urgency=medium * Rebuild (no source changes). diff --git a/debian/patches/07-reinit-on-any-error.diff b/debian/patches/07-reinit-on-any-error.diff index 3e00d93..69e2e56 100644 --- a/debian/patches/07-reinit-on-any-error.diff +++ b/debian/patches/07-reinit-on-any-error.diff @@ -7,16 +7,17 @@ Last-Update: 2015-05-18 =================================================================== --- a/g15daemon/main.c +++ b/g15daemon/main.c -@@ -204,10 +204,10 @@ +@@ -203,11 +203,10 @@ + g15daemon_send_event(masterlist->current->lcd, G15_EVENT_KEYPRESS, keypresses); lastkeys = keypresses; - +- - }else if(retval == -ENODEV && LIBG15_VERSION>=1200) { -+ }else if(retval < 0 && LIBG15_VERSION>=1200) { ++ }else if(retval != G15_NO_ERROR && retval != G15_ERROR_TIMEOUT && LIBG15_VERSION>=1200) { ++ g15daemon_log(LOG_WARNING,"Keyboard error (%d).. Reinitializing\n", retval); pthread_mutex_lock(&g15lib_mutex); while((retval=re_initLibG15() != G15_NO_ERROR) && !leaving){ - g15daemon_log(LOG_WARNING,"Keyboard has gone.. Retrying\n"); -+ g15daemon_log(LOG_WARNING,"Keyboard error (%d).. Reinitializing\n", retval); sleep(1); } if(!leaving) {