Review at  https://gerrit.osmocom.org/81

Make si2q scheduling optional

Previously si2quater SI messages were always scheduled. Check for
neighbor configuration and only schedule si2q when necessary.

Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f
Fixes: OS#1727
---
M openbsc/src/libbsc/system_information.c
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/81/81/1

diff --git a/openbsc/src/libbsc/system_information.c 
b/openbsc/src/libbsc/system_information.c
index 1f1d81e..8e59817 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -648,7 +648,7 @@

 static int generate_si2quater(uint8_t *output, struct gsm_bts *bts)
 {
-       int rc;
+       int rc, i;
        struct gsm48_system_information_type_2quater *si2q =
                (struct gsm48_system_information_type_2quater *) output;

@@ -667,6 +667,13 @@
        if (rc < 0)
                return rc;

+       for (i = 0; i < MAX_EARFCN_LIST; i++)
+               if (bts->si_common.si2quater_neigh_list.arfcn[i] !=
+                   OSMO_EARFCN_INVALID)
+                       break;
+       if (!bts->si_common.uarfcn_length && i == MAX_EARFCN_LIST)
+               bts->si_valid &= ~(1 << SYSINFO_TYPE_2quater);
+
        return sizeof(*si2q) + rc;
 }


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe997803ffb894133fd4d838410fe735791d414f
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max <[email protected]>

Reply via email to