diff -Nru g15daemon-1.9.5.3/debian/changelog g15daemon-1.9.5.3/debian/changelog --- g15daemon-1.9.5.3/debian/changelog 2019-11-16 18:25:13.000000000 +0000 +++ g15daemon-1.9.5.3/debian/changelog 2019-11-18 21:50:44.000000000 +0000 @@ -1,3 +1,11 @@ +g15daemon (1.9.5.3-11) unstable; urgency=medium + + * Reinitialize on eny error code, not only on a negative one. + * Remove unused variables. (Closes: bug#688465) + * Compliant to policy 4.4.1 + + -- Alexander Ponyatykh Tue, 19 Nov 2019 00:50:44 +0300 + g15daemon (1.9.5.3-10) unstable; urgency=medium * Rebuild (no source changes). diff -Nru g15daemon-1.9.5.3/debian/control g15daemon-1.9.5.3/debian/control --- g15daemon-1.9.5.3/debian/control 2019-11-16 18:25:13.000000000 +0000 +++ g15daemon-1.9.5.3/debian/control 2019-11-18 21:50:44.000000000 +0000 @@ -10,7 +10,7 @@ libg15-dev (>= 1.2.7-3), libg15render-dev (>= 1.2.0.svn250-2), libtool -Standards-Version: 4.1.4 +Standards-Version: 4.4.1 Homepage: https://sourceforge.net/projects/g15daemon/ Vcs-Browser: https://salsa.debian.org/debian/g15daemon Vcs-Git: https://salsa.debian.org/debian/g15daemon.git diff -Nru g15daemon-1.9.5.3/debian/patches/07-reinit-on-any-error.diff g15daemon-1.9.5.3/debian/patches/07-reinit-on-any-error.diff --- g15daemon-1.9.5.3/debian/patches/07-reinit-on-any-error.diff 2019-11-16 18:25:13.000000000 +0000 +++ g15daemon-1.9.5.3/debian/patches/07-reinit-on-any-error.diff 2019-11-18 21:50:44.000000000 +0000 @@ -3,20 +3,21 @@ Author: Alexander Ponyatykh Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/libusb/+bug/1357556 Forwarded: no -Last-Update: 2015-05-18 +Last-Update: 2019-11-17 =================================================================== --- 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) { diff -Nru g15daemon-1.9.5.3/debian/patches/08-remove-unused-variables.diff g15daemon-1.9.5.3/debian/patches/08-remove-unused-variables.diff --- g15daemon-1.9.5.3/debian/patches/08-remove-unused-variables.diff 1970-01-01 00:00:00.000000000 +0000 +++ g15daemon-1.9.5.3/debian/patches/08-remove-unused-variables.diff 2019-11-18 21:50:44.000000000 +0000 @@ -0,0 +1,44 @@ +Description: Remove unused variables + Global variable keyhandler is declared as pointer to incomplete struct type. + Upon closer inspection, it turned out that this variable and + client_handles_keys are unused. +Author: Alexander Ponyatykh +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=688465 +Last-Update: 2019-11-18 +=================================================================== +--- a/g15daemon/linked_lists.c ++++ b/g15daemon/linked_lists.c +@@ -30,8 +30,6 @@ + #include + #include + +-extern lcd_t *keyhandler; +-extern unsigned int client_handles_keys; + extern plugin_info_t *generic_info; + + lcd_t static * ll_create_lcd () { +@@ -175,12 +173,6 @@ + (*masterlist)->current->lcd->state_changed = 1; + } + +- if(&oldnode->lcd == (void*)keyhandler) { +- client_handles_keys = 0; +- keyhandler = NULL; +- g15daemon_log(LOG_WARNING,"Client key handler quit, going back to defaults"); +- } +- + if((*masterlist)->head!=oldnode){ + (*next)->prev = oldnode->prev; + (*prev)->next = oldnode->next; +--- a/g15daemon/main.c ++++ b/g15daemon/main.c +@@ -53,9 +53,7 @@ + int keyboard_backlight_off_onexit = 0; + unsigned int g15daemon_debug = 0; + unsigned int cycle_key; +-unsigned int client_handles_keys = 0; + static unsigned int set_backlight = 0; +-struct lcd_t *keyhandler = NULL; + + static int loaded_plugins = 0; + diff -Nru g15daemon-1.9.5.3/debian/patches/series g15daemon-1.9.5.3/debian/patches/series --- g15daemon-1.9.5.3/debian/patches/series 2019-11-16 18:25:13.000000000 +0000 +++ g15daemon-1.9.5.3/debian/patches/series 2019-11-18 21:50:44.000000000 +0000 @@ -5,3 +5,4 @@ 05-send-a-sync-event-after-key-up-down.diff 06-fix-buffer-overflow.diff 07-reinit-on-any-error.diff +08-remove-unused-variables.diff