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

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

dexter gerrit-no-reply at lists.osmocom.org
Tue Jul 6 12:50:46 UTC 2021


dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24600 )

Change subject: handover_ctrl: add control interface for handover settings
......................................................................


Patch Set 6:

(6 comments)

https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/include/osmocom/bsc/handover_cfg.h 
File include/osmocom/bsc/handover_cfg.h:

https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/include/osmocom/bsc/handover_cfg.h@73 
PS6, Line 73: must end with a "\0",
> see neels' comment below, every string constant gets a \0 appended to it. […]
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/include/osmocom/bsc/handover_cfg.h@264 
PS6, Line 264: 		"handover2 min-free-slots tch-h\0") \
> I guess this is a typo and he meant '\n'
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/24600/1/src/osmo-bsc/handover_ctrl.c 
File src/osmo-bsc/handover_ctrl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/24600/1/src/osmo-bsc/handover_ctrl.c@33 
PS1, Line 33: bool verify_vty_cmd_arg(void *ctx, const char *range, const char *value)
> yes, for a reason
Its has the "vty" in the name because the function uses the same range descriptions like the VTY but feel free to suggest a different name for that function.


https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/src/osmo-bsc/handover_ctrl.c 
File src/osmo-bsc/handover_ctrl.c:

https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/src/osmo-bsc/handover_ctrl.c@32 
PS6, Line 32: /* Verify a VTY command argument against its value specification, the value
> Here we could add: […]
Done


https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/src/osmo-bsc/handover_ctrl.c@73 
PS6, Line 73: CTRL_CMD_DEFINE(NAME, CTRL_CMD VTY_CMD_PREFIX VTY_CMD); \
> Hm, I don't understand how this works. […]
When CTRL_CMD it is used the constant will be defined like "handover2 min-free-slots tch-h\0", VTY_CMD_PREFIX and VTY_CMD will still hold strings, but they are cut short by the \0 in that constant.

Unfortunately there is no way to get around this using #if in some way. The only way to get rid of this would be to use VTY_CMD only and repeat every VTY_CMD_PREFIX VTY_CMD in CTRL_CMD for all functions. At the moment VTY_CMD is an optional parameter that is only used when the string contains illegal characters so that a new string is needed to be defined.

I have found a better solution now. The command name string is filtered before the command is installed. That also means we can get rid of the CTRL_CMD parameter again.


https://gerrit.osmocom.org/c/osmo-bsc/+/24600/6/src/osmo-bsc/handover_ctrl.c@114 
PS6, Line 114: 		cmd->reply = talloc_asprintf(cmd, "%s", #DEFAULT_VAL); \
> (we would usually also put { } around the else-scope)
Done



-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24600
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I12f143906818fd6b16e8783157cbb1eb51e49ffc
Gerrit-Change-Number: 24600
Gerrit-PatchSet: 6
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Assignee: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-Comment-Date: Tue, 06 Jul 2021 12:50:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr at sysmocom.de>
Comment-In-Reply-To: laforge <laforge at osmocom.org>
Comment-In-Reply-To: pespin <pespin at sysmocom.de>
Comment-In-Reply-To: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210706/24851de5/attachment.htm>


More information about the gerrit-log mailing list