Removed one NOTIFY_LOCK() that shouldn't have been there

This commit is contained in:
2017-09-29 20:49:52 +02:00
parent 7bca46384e
commit 1614194d76
4 changed files with 7 additions and 4 deletions
+5 -1
View File
@@ -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
-1
View File
@@ -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));