From 9ed0d17d536194483179c97838af9ecbd88131f1 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 10 Aug 2020 21:12:46 +0200 Subject: hodec2: do not keep candidates with zero requirements met When check_requirements() returns zero, do not keep such an entry in the candidates list at all. This removes logging confusion, where some "candidates" are still listed even though not meeting any handover requirements. Change-Id: I12e48292d5731cb601165c870b9570003bc488ec --- src/osmo-bsc/handover_decision_2.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osmo-bsc/handover_decision_2.c b/src/osmo-bsc/handover_decision_2.c index 26a8840f1..31919576e 100644 --- a/src/osmo-bsc/handover_decision_2.c +++ b/src/osmo-bsc/handover_decision_2.c @@ -861,6 +861,10 @@ static void collect_assignment_candidate(struct gsm_lchan *lchan, struct ho_cand }; debug_candidate(&c, 0, tchf_count, tchh_count); + + if (!c.requirements) + return; + clist[*candidates] = c; (*candidates)++; } @@ -966,6 +970,9 @@ static void collect_handover_candidate(struct gsm_lchan *lchan, struct neigh_mea debug_candidate(&c, av_rxlev, tchf_count, tchh_count); + if (!c.requirements) + return; + clist[*candidates] = c; (*candidates)++; } -- cgit v1.2.3