Add timer ID attribute, for safe cleanup in the scripted environment

This commit is contained in:
Sergey Lyubka
2022-07-17 12:52:30 +01:00
parent 1fbf534f9a
commit 4a3d760c06
6 changed files with 12 additions and 6 deletions
+1 -1
View File
@@ -8,7 +8,7 @@
void mg_timer_init(struct mg_timer **head, struct mg_timer *t, uint64_t ms,
unsigned flags, void (*fn)(void *), void *arg) {
struct mg_timer tmp = {ms, 0U, 0U, flags, fn, arg, *head};
struct mg_timer tmp = {0U, ms, 0U, 0U, flags, fn, arg, *head};
*t = tmp;
*head = t;
}