Change in osmo-bsc[master]: handover_ctrl: add control interface for handover settings

neels gerrit-no-reply at
Wed Jul 7 21:31:35 UTC 2021

neels has posted comments on this change. ( )

Change subject: handover_ctrl: add control interface for handover settings

Patch Set 7: Code-Review+1


nice one, patch became much smaller! 
File src/osmo-bsc/handover_ctrl.c: 
> When CTRL_CMD it is used the constant will be defined like "handover2 min-free-slots tch-h\0", VTY_C […]
I figured out your nifty trick there later on  : )
interesting solution, even though it had most of us confused at first.
with a comment explaining in detail that could have passed CR too : ) 
File src/osmo-bsc/handover_ctrl.c: 
PS7, Line 185: {
0) I don't understand yet where the spaces-to-dots conversion happens.
Is it possible that that step also sanitizes the '/' characters already,
and we could get away without needing a filter function?? (I guess not)

1) Let's avoid allocating most strings with this step:

  if (osmo_separated_identifiers_valid(cmd->name, " -"))
      return cmd;

2) I thought we could also try to use the existing osmo_identifier_sanitize_buf() API, something like

  cmd->name = talloc_strdup(cmd->name);
  osmo_identifier_sanitize_buf(cmd->name, NULL, "-");

But AFAICT there are a number of problems with that, because unfortunately sep_chars has opposite meaning in osmo_separated_identifiers_valid() and osmo_identifier_sanitize_buf().
This loop here is also fine I guess, because there is only fixed hardcoded input data anyway. But if you like maybe give it a try...

To view, visit
To unsubscribe, or for help writing mail filters, visit

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I12f143906818fd6b16e8783157cbb1eb51e49ffc
Gerrit-Change-Number: 24600
Gerrit-PatchSet: 7
Gerrit-Owner: dexter <pmaier at>
Gerrit-Assignee: neels <nhofmeyr at>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at>
Gerrit-Reviewer: fixeria <vyanitskiy at>
Gerrit-Reviewer: laforge <laforge at>
Gerrit-Reviewer: neels <nhofmeyr at>
Gerrit-Reviewer: pespin <pespin at>
Gerrit-Comment-Date: Wed, 07 Jul 2021 21:31:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: neels <nhofmeyr at>
Comment-In-Reply-To: dexter <pmaier at>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gerrit-log mailing list