From de50bec5625a426c405fab2d8bcd95042fcf74d0 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 10 Apr 2024 17:18:53 +0200 Subject: [PATCH] bugfix for targeted services --- satrs-example/src/pus/action.rs | 4 +++- satrs-example/src/pus/hk.rs | 4 +++- satrs-example/src/pus/mode.rs | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/satrs-example/src/pus/action.rs b/satrs-example/src/pus/action.rs index 2967350..b34399a 100644 --- a/satrs-example/src/pus/action.rs +++ b/satrs-example/src/pus/action.rs @@ -283,7 +283,9 @@ impl Targete PusPacketHandlerResult::Empty => return HandlingStatus::Empty, }, Err(error) => { - error!("PUS packet handling error: {error:?}") + error!("PUS packet handling error: {error:?}"); + // To avoid permanent loops on error cases. + return HandlingStatus::Empty; } } HandlingStatus::HandledOne diff --git a/satrs-example/src/pus/hk.rs b/satrs-example/src/pus/hk.rs index 92f74ba..3526c01 100644 --- a/satrs-example/src/pus/hk.rs +++ b/satrs-example/src/pus/hk.rs @@ -316,7 +316,9 @@ impl PusPacketHandlerResult::Empty => return HandlingStatus::Empty, }, Err(error) => { - error!("PUS packet handling error: {error:?}") + error!("PUS packet handling error: {error:?}"); + // To avoid permanent loops on error cases. + return HandlingStatus::Empty; } } HandlingStatus::HandledOne diff --git a/satrs-example/src/pus/mode.rs b/satrs-example/src/pus/mode.rs index 36a6ee6..6c85576 100644 --- a/satrs-example/src/pus/mode.rs +++ b/satrs-example/src/pus/mode.rs @@ -288,7 +288,9 @@ impl Targete PusPacketHandlerResult::Empty => return HandlingStatus::Empty, }, Err(error) => { - error!("PUS mode service: packet handling error: {error:?}") + error!("PUS mode service: packet handling error: {error:?}"); + // To avoid permanent loops on error cases. + return HandlingStatus::Empty; } } HandlingStatus::HandledOne