Minor refactor

This commit is contained in:
Theo Arends 2020-07-04 14:29:15 +02:00
parent b69a0add84
commit c3a056a78f

View File

@ -749,10 +749,10 @@ bool RuleSetProcess(uint8_t rule_set, String &event_saved)
bool RulesProcessEvent(char *json_event) bool RulesProcessEvent(char *json_event)
{ {
bool serviced = false; if (Rules.busy) { return false; }
if (!Rules.busy) {
Rules.busy = true; Rules.busy = true;
bool serviced = false;
#ifdef USE_DEBUG_DRIVER #ifdef USE_DEBUG_DRIVER
ShowFreeMem(PSTR("RulesProcessEvent")); ShowFreeMem(PSTR("RulesProcessEvent"));
@ -779,7 +779,7 @@ bool RulesProcessEvent(char *json_event)
} }
Rules.busy = false; Rules.busy = false;
}
return serviced; return serviced;
} }