Skip to content

Commit

Permalink
correct wdtFeed on ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorYbema committed Sep 5, 2024
1 parent e37c69b commit 06e5692
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions HeishaMon/rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,9 +878,6 @@ int rules_parse(char *file) {

int ret = 0;
while((ret = rule_initialize(&input, &rules, &nrrules, &mem, NULL)) == 0) {
#ifdef ESP8266
ESP.wdtFeed(); //keep the dog happy loading large rules on the esp8266
#endif
input.payload = &mempool[input.len];
}

Expand Down
5 changes: 3 additions & 2 deletions HeishaMon/src/rules/rules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2760,9 +2760,10 @@ static int16_t rule_create(char **text, struct rules_t *obj) {
pos = 0;

while(loop) {
#if defined(ESP8266) || defined(ESP32)
delay(0);
#ifdef ESP8266
ESP.wdtFeed(); //keep the dog happy loading large rules on the esp8266
#endif

#ifdef DEBUG
printf("%s %d %d %d %d %s\n", __FUNCTION__, __LINE__, depth, pos, getval(obj->bc.nrbytes), token_names[go].name);
#endif
Expand Down

0 comments on commit 06e5692

Please sign in to comment.