Attention is currently required from: arehbein.
Patch set 1:Code-Review -1
8 comments:
File src/osmo-bsc/bts_ctrl.c:
Patch Set #1, Line 587: OSMO_STRBUF_PRINTF(*csv, "%" PRIu8 ",", n->bts_nr);
You actually need to print bts->nr, not bts->bts_nr.
The later is the bts id in the specific BTS<->BSC link, which is usually 0.
"nr" is the ID you see in the VTY config and which identifies the BTS within the BSC.
Patch Set #1, Line 607: if (csv.chars_needed >= csv.len) { /* Just to be save, although this is very unlikely */
It's impossible that this is triggered.
We can only have up to 255 BTS (limited by uint8_t bts->nr). Hence, even if all of the ids would be 3 digits, the string would be 255*3 + 255 (for commas), so we can never reach 4096. You can even lower the buffer up to 1024 actually.
Patch Set #1, Line 614: write_neighbors(&bts->neighbors, &csv);
since you no longer need this function twice, just drop te function and inline it's just a loop.
Patch Set #1, Line 617: cmd->reply = "No BTS neighbors configured through BTS number";
return empty string here, it's way easier to parse by clients.
Patch Set #1, Line 630: CTRL_CMD_DEFINE_RO(bts_neighbor_list, "neighbor-list");
My understanding is that we already have "bts.N.neighbor-bts.add" and "bts.N.neighbor-bts.del", so adding here a "bts.N.neighbor-bts.bts-list" cmd would make more sense.
You could also name it "bts.N.neighbor-bts.by-bts-nr"
File tests/ctrl/osmo-bsc-neighbor-list.cfg:
Patch Set #1, Line 1: network
Please if possible drop all config lines which are not really needed/used by the test.
File tests/ctrl_test_runner.py:
Unrelated change, submit a new patch if needed.
Patch Set #1, Line 580: self.assertEqual(r['value'], 'No BTS neighbors configured through BTS number')
this makes it difficult for the client. Simply return an empty string in osmo-bsc in this case.
To view, visit change 30982. To unsubscribe, or for help writing mail filters, visit settings.