From ed25e33899cb55377b1bc1f4f47625889bb52fa7 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 18 Oct 2018 10:39:18 +0200 Subject: replaced ncurses ui sleep&ipc_msgcount check with ipc_msgrecv to fix issues with multithreading/multiprocess handling Signed-off-by: Toni Uhlig --- src/ui_nask.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/ui_nask.c') diff --git a/src/ui_nask.c b/src/ui_nask.c index 429e404..af3ac73 100644 --- a/src/ui_nask.c +++ b/src/ui_nask.c @@ -170,10 +170,8 @@ passwd_input_cb(WINDOW *wnd, void *data, int key) ui_ipc_msgrecv(MQ_IF, ipc_buf, 3); show_info_wnd(busywnd, "BUSY", ipc_buf, COLOR_PAIR(5), COLOR_PAIR(5), true, false); - sleep(2); - if (ui_ipc_msgcount(MQ_IF) > 0) { - ui_ipc_msgrecv(MQ_IF, ipc_buf, 3); + if (ui_ipc_msgrecv(MQ_IF, ipc_buf, 10) > 0) { show_info_wnd(errwnd, "ERROR", ipc_buf, COLOR_PAIR(4), COLOR_PAIR(4), true, true); while (ui_wgetchtest(1500, '\n') != DOUI_KEY) { }; } -- cgit v1.2.3