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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/17017 ) Change subject: tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() ...................................................................... tdef_vty: do not enforce enum 'node_type' in osmo_tdef_vty_groups_init() Some osmo-* applications may need to use their own VTY node as a parent for the timer configuration commands. Therefore it makes more sense to use 'int' instead of 'enum node_type'. Let's also clarify that osmo_tdef_vty_groups_init() accepts parent node for configuration commands only: 'parent_node' -> 'cfg_node'. Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c --- M include/osmocom/vty/tdef_vty.h M src/vty/tdef_vty.c 2 files changed, 4 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/17017/1 diff --git a/include/osmocom/vty/tdef_vty.h b/include/osmocom/vty/tdef_vty.h index 6334d5b..c054e22 100644 --- a/include/osmocom/vty/tdef_vty.h +++ b/include/osmocom/vty/tdef_vty.h @@ -68,7 +68,7 @@ struct osmo_tdef *osmo_tdef_vty_parse_T_arg(struct vty *vty, struct osmo_tdef *tdefs, const char *osmo_tdef_str); unsigned long osmo_tdef_vty_parse_val_arg(const char *val_arg, unsigned long default_val); -void osmo_tdef_vty_groups_init(enum node_type parent_node, struct osmo_tdef_group *groups); +void osmo_tdef_vty_groups_init(int cfg_node, struct osmo_tdef_group *groups); void osmo_tdef_vty_groups_write(struct vty *vty, const char *indent); /*! @} */ diff --git a/src/vty/tdef_vty.c b/src/vty/tdef_vty.c index 4549a61..1f661b7 100644 --- a/src/vty/tdef_vty.c +++ b/src/vty/tdef_vty.c @@ -361,10 +361,10 @@ * The given timer definitions group is stored in a global pointer, so this can be done only once per main() scope. * It would also be possible to have distinct timer groups on separate VTY subnodes, with a "manual" implementation, but * not with this API. - * \param[in] parent_node VTY node id at which to add the timer group commands, e.g. CONFIG_NODE. + * \param[in] cfg_node VTY node at which to add the timer configuration commands, e.g. CONFIG_NODE. * \param[in] groups Global timer groups definition. */ -void osmo_tdef_vty_groups_init(enum node_type parent_node, struct osmo_tdef_group *groups) +void osmo_tdef_vty_groups_init(int cfg_node, struct osmo_tdef_group *groups) { struct osmo_tdef_group *g; OSMO_ASSERT(!global_tdef_groups); @@ -380,7 +380,7 @@ cfg_timer_cmd.doc = timer_doc_string("Configure or show timers\n", OSMO_TDEF_VTY_DOC_SET); install_element_ve(&show_timer_cmd); - install_element(parent_node, &cfg_timer_cmd); + install_element(cfg_node, &cfg_timer_cmd); } /*! Write the global osmo_tdef_group configuration to VTY, as previously passed to osmo_tdef_vty_groups_init(). -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/17017 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ifb4c406c85d76a25fc53fc235484599aa87dc77c Gerrit-Change-Number: 17017 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <axilirator at gmail.com> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200125/5ebc8cb8/attachment.htm>