Harald Welte has submitted this change and it was merged.

Change subject: fixup: neigh_meas_avg: detect invalid window size as <=0, log 
if invalid
......................................................................


fixup: neigh_meas_avg: detect invalid window size as <=0, log if invalid

Change-Id: I8c5d0642aeb4fbee73a035b9f73cf3a09b1bcf90
---
M src/libbsc/handover_decision.c
1 file changed, 3 insertions(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/handover_decision.c b/src/libbsc/handover_decision.c
index 04ca144..1ad4b36 100644
--- a/src/libbsc/handover_decision.c
+++ b/src/libbsc/handover_decision.c
@@ -103,8 +103,10 @@
        if (window < nmp->rxlev_cnt)
                window = nmp->rxlev_cnt;
        /* this should never happen */
-       if (window == 0)
+       if (window <= 0) {
+               LOGP(DHO, LOGL_ERROR, "Requested Neighbor RxLev for invalid 
window size of %d\n", window);
                return 0;
+       }
 
        idx = calc_initial_idx(ARRAY_SIZE(nmp->rxlev),
                                nmp->rxlev_cnt % ARRAY_SIZE(nmp->rxlev),

-- 
To view, visit https://gerrit.osmocom.org/5902
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c5d0642aeb4fbee73a035b9f73cf3a09b1bcf90
Gerrit-PatchSet: 4
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder

Reply via email to