From e63639bff39099c9a7598cbb98e7713699066c8b Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 10 Jul 2016 14:12:02 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/mds-kkbd.c | 4 ++-- src/mds-vt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mds-kkbd.c b/src/mds-kkbd.c index f5e69db..c6bd282 100644 --- a/src/mds-kkbd.c +++ b/src/mds-kkbd.c @@ -180,7 +180,7 @@ static pthread_t kbd_thread; /** * Whether `kbd_thread` has started */ -static int kbd_thread_started = 0; +static volatile sig_atomic_t kbd_thread_started = 0; /** * Mutex that should be used when sending message @@ -1784,7 +1784,7 @@ void received_info(int signo) iprintf("scancode buffer pointer: %i", scancode_ptr); iprintf("saved keyboard mode: %i", saved_kbd_mode); iprintf("send buffer size: %zu bytes", send_buffer_size); - iprintf("keyboard thread started: %s", connected ? "yes" : "no"); + iprintf("keyboard thread started: %s", kbd_thread_started ? "yes" : "no"); iprintf("keycode remapping tabel size: %zu", mapping_size); iprint("keycode remapping tabel:"); for (i = 0; i < mapping_size; i++) diff --git a/src/mds-vt.c b/src/mds-vt.c index 904c116..c593618 100644 --- a/src/mds-vt.c +++ b/src/mds-vt.c @@ -115,7 +115,7 @@ static int secondary_socket_fd; /** * Whether the secondary thread has been started */ -static int secondary_thread_started = 0; +static volatile sig_atomic_t secondary_thread_started = 0; /** * The secondary thread -- cgit v1.2.3-70-g09d2