From 6523ca598db5e169af11c094579e8c2fc68a0028 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 18 Oct 2018 19:20:11 +0200 Subject: switched back to sleep() for busy windows to assure a minimum wait Signed-off-by: Toni Uhlig --- src/ui_nask.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/ui_nask.c b/src/ui_nask.c index af3ac73..11f9123 100644 --- a/src/ui_nask.c +++ b/src/ui_nask.c @@ -170,10 +170,13 @@ 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(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) { }; + if (ui_ipc_getvalue(SEM_UI) > 0 && + ui_ipc_msgrecv(MQ_IF, ipc_buf, 3) > 0) + { + show_info_wnd(errwnd, "ERROR", ipc_buf, COLOR_PAIR(4), COLOR_PAIR(4), true, true); + while (ui_wgetchtest(1500, '\n') != DOUI_KEY) { }; } ui_thrd_suspend(); -- cgit v1.2.3