Commit 682af0e0 authored by Fin Maaß's avatar Fin Maaß Committed by github-actions[bot]
Browse files

mgmt: hawkbit: also clear in the call of hawkbit_autohandler()

the k_event_clear in the work might be to late sometimes, when
hawkbit_autohandler_wait() is executed directly after
hawkbit_autohandler(). This leads to getting the events
of the former execution and also not waiting until the
current autohandler run is finished.

Signed-off-by: default avatarFin Maaß <f.maass@vogl-electronic.com>
(cherry picked from commit e59451a7)
parent 43c79ba7
Loading
Loading
Loading
Loading
+2 −0
Changes for subsys/mgmt/hawkbit/hawkbit_autohandler.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -119,6 +119,8 @@ int hawkbit_autohandler_set_delay(k_timeout_t timeout, bool if_bigger)

void hawkbit_autohandler(bool auto_reschedule)
{
	k_event_clear(&hawkbit_autohandler_event, UINT32_MAX);

	if (auto_reschedule) {
		k_work_reschedule(&hawkbit_work_handle, K_NO_WAIT);
	} else {