From 76308ab3fb5654be25ab4eab6497c725b172cdc0 Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 11 Feb 2021 22:54:51 +0100 Subject: [PATCH] l1sap.c: be sure that FACCH repetition is turned off At the beginning of repeated_dl_facch_active_decision() the ACCH repetition capabilitiy flags (command only or all LAPDM frames) are tested. If no FACCH repetition is enabled, the function exists. However, we should also make sure that the struct memeber that enables FACCH repetition on the lower level is set to false as well. Normally that should be the case because it was never set to true before, but it is better to be sure. Change-Id: Id07091cc89352281b41532d583a8bc004477c71a Related: SYS#5114 --- src/common/l1sap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/common/l1sap.c b/src/common/l1sap.c index b6970f414..3de76ab49 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -980,9 +980,15 @@ void repeated_dl_facch_active_decision(struct gsm_lchan *lchan, const uint8_t *l uint8_t lower; uint8_t rxqual; + /* This is an optimization so that we exit as quickly as possible if + * there are no FACCH repetition capabilities present. However If the + * repeated FACCH capabilities vanish for whatever reason, we must be + * sure that FACCH repetition is disabled. */ if (!lchan->repeated_acch_capability.dl_facch_cmd - && !lchan->repeated_acch_capability.dl_facch_all) + && !lchan->repeated_acch_capability.dl_facch_all) { + lchan->repeated_dl_facch_active = false; return; + } /* Threshold disabled (always on) */ if (lchan->repeated_acch_capability.rxqual == 0) {