> what is the reason to re-generate some of the SI when the n-th trx is up?
> Shouldn't we generate the SI once and then based on the TRX decide which
> one (gen_si) to send to the BTS?
>   
here is an update of my patch. it generates only once now.
diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c
index a19179d..0360700 100644
--- a/openbsc/src/libbsc/bsc_init.c
+++ b/openbsc/src/libbsc/bsc_init.c
@@ -178,13 +178,15 @@ 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))) {
+               /* Only generate SI if this SI is not in "static" (user-defined)
+                * mode */
+               if ((!(bts->si_mode_static & (1 << i)))
+                && (!(bts->si_valid & (1 << i)))) {
                        rc = gsm_generate_si(bts, i);
                        if (rc < 0)
                                goto err_out;
                        si_len[i] = rc;
+                       bts->si_valid |= (1 << i);
                } else {
                        if (i == SYSINFO_TYPE_5 || i == SYSINFO_TYPE_5bis
                         || i == SYSINFO_TYPE_5ter)
@@ -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;

Reply via email to