[Message filter] fix initalization bug
@@ -165,6 +165,11 @@ void MsgAlloc_Init(memory_stats_t *memory_stats)
{
mem_stat = memory_stats;
}
+ ctx.ShiftMask = 0;
+ for (uint16_t i = 0; i < MASK_SIZE; i++)
+ {
+ ctx.IDMask[i] = 0;
+ }
// Reset have been made
reset_needed = false;
}
@@ -711,11 +716,6 @@ error_return_t MsgAlloc_IsReseted(void)
PortMng_Init();
// We need to reset MsgAlloc
MsgAlloc_Init(NULL);
- ctx.ShiftMask = 0;
- for (uint16_t i = 0; i < MASK_SIZE; i++)
- {
- ctx.IDMask[i] = 0;
- }
return SUCCEED;
}
return FAILED;
