Holger Hans Peter Freyther wrote:
> My comment was meant as an ecouragement to check if we could separate the SI
> generation from the place where we select which ones to send to the BTS.
>
hi holger,
if we want changes of config to be present in the SI whenever a TRX
comes up, it is required to generate it when this happens. (so forget my
last patch, because it does not do it and also it does it wrong.) i have
no better solution in mind right now. can you test my attached patch
before i commit it, because i don't have multi TRX setup?
regards,
andreas
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index a19179d..593372d 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -178,9 +178,11 @@ static int set_system_infos(struct gsm_bts_trx *trx)
for (n = 0; n < n_si; n++) {
i = gen_si[n];
- bts->si_valid |= (1 << i);
/* Only generate SI if this SI is not in "static"
(user-defined) mode */
if (!(bts->si_mode_static & (1 << i))) {
+ /* Set SI as being valid. gsm_generate_si() might unset
+ * it, if SI is not required. */
+ bts->si_valid |= (1 << i);
rc = gsm_generate_si(bts, i);
if (rc < 0)
goto err_out;
@@ -198,10 +200,10 @@ static int set_system_infos(struct gsm_bts_trx *trx)
/* Third, we send the selected SI via RSL */
- for (i = SYSINFO_TYPE_1; i < _MAX_SYSINFO_TYPE; i++) {
+ for (n = 0; n < n_si; n++) {
+ i = gen_si[n];
if (!(bts->si_valid & (1 << i)))
continue;
-
rc = rsl_si(trx, i, si_len[i]);
if (rc < 0)
return rc;