From 1614194d7679743f91062a62eddda7e4a6e5418f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Fri, 29 Sep 2017 20:49:52 +0200 Subject: [PATCH] Removed one NOTIFY_LOCK() that shouldn't have been there --- front-end | 2 +- libesphttpd | 2 +- user/cgi_sockets.c | 6 +++++- user/screen.c | 1 - 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/front-end b/front-end index f5dd70a..673358e 160000 --- a/front-end +++ b/front-end @@ -1 +1 @@ -Subproject commit f5dd70a6f32ac36f0820badc170832f27242a09d +Subproject commit 673358e2ce64b65b28a4a94079dd83d56a51254a diff --git a/libesphttpd b/libesphttpd index 3479ab3..24f9a37 160000 --- a/libesphttpd +++ b/libesphttpd @@ -1 +1 @@ -Subproject commit 3479ab3efcb4581669370cde6a607f936ff5515a +Subproject commit 24f9a371eb5c0804dcc6657f99449ef07788140c diff --git a/user/cgi_sockets.c b/user/cgi_sockets.c index 663dfac..44accb2 100644 --- a/user/cgi_sockets.c +++ b/user/cgi_sockets.c @@ -98,10 +98,12 @@ updateNotifyCb(void *arg) int max_bl, total_bl; cgiWebsockMeasureBacklog(URL_WS_UPDATE, &max_bl, &total_bl); + inp_dbg("Notify broadcast +%02Xh?", pendingBroadcastTopics); + if (!notify_available || notify_cooldown || (max_bl > 2048)) { // do not send if we have anything significant backlogged // postpone a little TIMER_START(&updateNotifyTim, updateNotifyCb, 4, 0); - inp_dbg("postpone notify content"); + inp_dbg("postpone notify; avail? %d coold? %d maxbl? %d", notify_available, notify_cooldown, max_bl); return; } @@ -149,6 +151,8 @@ void ICACHE_FLASH_ATTR screen_notifyChange(ScreenNotifyTopics topics) termconf->display_tout_ms = SCR_DEF_DISPLAY_TOUT_MS; } + inp_dbg("Notify +%02Xh", topics); + pendingBroadcastTopics |= topics; // NOTE: the timer is restarted if already running diff --git a/user/screen.c b/user/screen.c index 87a0245..cf6f5f0 100644 --- a/user/screen.c +++ b/user/screen.c @@ -412,7 +412,6 @@ screen_swap_state(bool alternate) if (alternate) { ansi_dbg("Swap to alternate"); - NOTIFY_LOCK(); // store old state memcpy(state_backup.title, termconf_live.title, TERM_TITLE_LEN); memcpy(state_backup.btn, termconf_live.btn, sizeof(termconf_live.btn));