Attention is currently required from: pespin, fixeria.
matanp has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/32565 )
Change subject: ctrl: Add getting neighbor list ......................................................................
Patch Set 3:
(1 comment)
File src/osmo-bsc/bts_ctrl.c:
https://gerrit.osmocom.org/c/osmo-bsc/+/32565/comment/c0df8280_2d26d8a4 PS3, Line 531: cmd->reply = talloc_asprintf_append(cmd->reply, i == 0 ? "%u" : " %u", i);
there's several things I'm not liking here: […]
1-In my opinion "rf_states", "channel-load", "rach-access-control-classes" and "neighbor-bts list" kind of return lists and separation character changes (spaces in "channel-load" and "rach-access-control-classes", commas in "neighbor-bts list" and semicolons in "rf_states") - I have no personal preference, but perhaps it will be best to "standardise" it (tell me what you prefer and I will open PRs for the rest too). 2- I am really not an expert in libtalloc, but from reading the source code it seems that `talloc_asprintf_append` allocates memory by calling `talloc_realloc` (which frees the previous chunk if needed if I understand correctly). If we still don't want to reallocate that much, why not allocate 4009 (with comment explaining it, o course) bytes since it is the maximum length of the result?