From 8620bd02834ffba427a044fa6076429ab9472f82 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 13 Apr 2023 12:35:56 +0200 Subject: [PATCH] avoid faulty reply for STR special requests --- linux/acs/StrComHandler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/linux/acs/StrComHandler.cpp b/linux/acs/StrComHandler.cpp index 4b3500c3..3c88a71b 100644 --- a/linux/acs/StrComHandler.cpp +++ b/linux/acs/StrComHandler.cpp @@ -125,6 +125,7 @@ ReturnValue_t StrComHandler::startImageUpload(std::string fullname) { } { MutexGuard mg(lock); + replyWasReceived = false; state = InternalState::UPLOAD_IMAGE; } semaphore.release(); @@ -151,6 +152,7 @@ ReturnValue_t StrComHandler::startImageDownload(std::string path) { downloadImage.path = path; { MutexGuard mg(lock); + replyWasReceived = false; state = InternalState::DOWNLOAD_IMAGE; } terminate = false; @@ -187,6 +189,7 @@ ReturnValue_t StrComHandler::startFirmwareUpdate(std::string fullname) { flashWrite.lastRegion = static_cast(startracker::FirmwareRegions::LAST); { MutexGuard mg(lock); + replyWasReceived = false; state = InternalState::FIRMWARE_UPDATE; } semaphore.release(); @@ -216,6 +219,7 @@ ReturnValue_t StrComHandler::startFlashRead(std::string path, uint8_t startRegio flashRead.size = length; { MutexGuard mg(lock); + replyWasReceived = false; state = InternalState::FLASH_READ; } semaphore.release();