From 697bbcd6d4dc9194d289e393fa6cd73dd9eef4ad Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 7 Nov 2022 13:36:57 +1100 Subject: [PATCH] [host] app: correct timer restart on lgmp corruption recovery --- host/src/app.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/host/src/app.c b/host/src/app.c index 527f1e82..a52fb53e 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -149,9 +149,7 @@ static bool lgmpTimer(void * opaque) DEBUG_ERROR("LGMP reported the shared memory has been corrrupted, " "attempting to recover"); app.state = APP_STATE_REINIT; - - // this is not a termination state, don't stop the timer - return true; + return false; } DEBUG_ERROR("lgmpHostProcess Failed: %s", lgmpStatusString(status)); @@ -860,9 +858,9 @@ int app_main(int argc, char * argv[]) { DEBUG_INFO("Performing LGMP reinitialization"); lgmpShutdown(); + app.state = APP_STATE_RUNNING; if (!lgmpSetup(&shmDev)) goto fail_lgmp; - app.state = APP_STATE_RUNNING; } if (app.state == APP_STATE_IDLE)