Fix per-BTS counter group index

I discovered that the per-BTS counter group could only be requested
for BTS 0 but didn't work for any further BTSs.

This is a bug introduced in Change-Id I5bd9e6e333b1c396beae46630986b17e7f8b82ef
where we introudce the per-BTS counters,t but allocate all of them with
index '0'.

Change-Id: I1b56f8d7b47597ed263e6808074483edca0895de
This commit is contained in:
Harald Welte 2017-12-14 13:05:24 +01:00
parent 66d2ef81b6
commit 2ed22c83df
1 changed files with 1 additions and 1 deletions

View File

@ -347,7 +347,7 @@ struct gsm_bts *gsm_bts_alloc(struct gsm_network *net, uint8_t bts_num)
sizeof(bts->gprs.cell.rlc_cfg));
/* init statistics */
bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, 0);
bts->bts_ctrs = rate_ctr_group_alloc(bts, &bts_ctrg_desc, bts->nr);
if (!bts->bts_ctrs) {
talloc_free(bts);
return NULL;