libosmocore.git branch master updated. 0.9.6-392-g657c5b6c

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/osmocom-commitlog@lists.osmocom.org/.

gitosis at osmocom.org gitosis at osmocom.org
Sat Sep 23 12:25:16 UTC 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "An utility library for Open Source Mobile Communications".

The branch, master has been updated
       via  657c5b6cadcef470c7ff9bffed3caab227026e6a (commit)
       via  0b723f6a6cdc4171ee67ddd8d8c1bb812fb4cf06 (commit)
      from  b022c867e86333ceaad9027e2e7ee621ab3891e5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cgit.osmocom.org/libosmocore/commit/?id=657c5b6cadcef470c7ff9bffed3caab227026e6a

commit 657c5b6cadcef470c7ff9bffed3caab227026e6a
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Mon Sep 18 16:42:06 2017 +0200

    vty: derive node name from prompt, use as XML ids
    
    The 'show online-help' produces XML output with <node id="..."> ids.  We
    reference those from the osmo-gsm-manuals.
    
    Instead of numeric IDs coming from internal code, rather use a human-readable
    node ID -- referencing id='config-msc' is much easier than referencing id='23'.
    
    Add a char name[] to struct cmd_node, to hold this name. This may be provided
    upon struct definition.
    
    Since callers of the VTY API so far don't have a name yet, we would need to add
    names everywhere to get meaningful node IDs. There is a way to get node ID
    names without touching dependent code:
    
    My first idea was to find out which command entered the node, i.e. command
    'msc' enters the MSC_NODE. But it is impossible to derive which command entered
    which node from data structs, it's hidden in the vty command definition.
    
    But in fact all (TM) known API callers indeed provide a prompt string that
    contains a logical and human readable string name. Thus, if the name is unset
    in the struct, parse the prompt string and strip all "weird" characters to
    obtain a node name from that. We can still set names later on, but for now will
    have meaningful node IDs (e.g. 'config-msc' from '%s(config-msc)# ') without
    touching any dependent code.
    
    When VTY nodes get identical node names, which is quite possible, the XML
    export de-dups these by appending _2, _3,... suffixes. The first occurence is
    called e.g. 'name', the second 'name_2', then 'name_3', and so forth.
    
    If a node has no name (even after parsing the prompt), it will be named merely
    by the suffix. The first empty node will become id='_1', then '_2', '_3', and
    so forth. This happens for nodes like VIEW_NODE or AUTH_NODE.
    
    If this is merged, we need to adjust the references in osmo-gsm-manuals.git.
    This can happen in our own time though, because we manually create the vty
    reference xml and copy it to the osmo-gsm-manuals.git and then update the
    references from the vty_additions.xml. This anyway has to happen because
    currently the references tend to be hopelessly out of sync anyway, placing
    comments at wildly unrelated VTY commands.
    
    Change-Id: I8fa555570268b231c5e01727c661da92fad265de

http://cgit.osmocom.org/libosmocore/commit/?id=0b723f6a6cdc4171ee67ddd8d8c1bb812fb4cf06

commit 0b723f6a6cdc4171ee67ddd8d8c1bb812fb4cf06
Author: Neels Hofmeyr <neels at hofmeyr.de>
Date:   Mon Sep 18 17:10:36 2017 +0200

    vty: use internal node id for xml ids
    
    The 'show online-help' produces XML output with <node id="..."> ids.  We
    reference those from the osmo-gsm-manuals, but until now, these ids fall out of
    sync when the amount of VTY nodes changes.
    
    Change these ids to use the internal node ID constant (as in enum bsc_vty_node)
    instead of a simple counter.
    
    If this is merged, we need to adjust the references in osmo-gsm-manuals.git.
    
    Change-Id: Ib07fb9d9106e19f5be6539493e82b5d5991f8bc2

-----------------------------------------------------------------------

Summary of changes:
 include/osmocom/vty/command.h |  5 +++++
 src/vty/command.c             | 47 ++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 51 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
An utility library for Open Source Mobile Communications



More information about the osmocom-commitlog mailing list