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?
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/32565
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Icba0b7d92f4c67e617d707ca651d674f0d1ba8a7
Gerrit-Change-Number: 32565
Gerrit-PatchSet: 3
Gerrit-Owner: matanp <matan1008(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 15 May 2023 20:26:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment