Commit Graph

9 Commits

Author SHA1 Message Date
Alexander Couzens 49865053bc ctrl/vty: fsm: use correct element when iterating over fsm->proc.children
Fixes crashes when using vty `show fsm-instances all`
when fsm children are present.

Change-Id: I4ae0bee7f7f57ec6675cfb52ca6cf0d523d15362
2018-07-29 14:35:00 +00:00
Stefan Sperling cc81722736 ensure VTY commands don't segfault if an FSM has no event names
If no event names are defined for an FSM, show a placeholder
message which points out the problem instead of segfaulting.

Change-Id: I87457945a7b76aa052305c9c531722be1ea0c1d1
Related: OS#3007
2018-02-26 19:01:10 +00:00
Stefan Sperling 218c4de84f ensure that osmo_fsm vty commands are only installed once
There is a desire to install osmo_fsm vty commands automatically in
a library context, rather than requiring every application which
directly or indirectly uses osmo_fsm to run osmo_fsm_vty_add_cmd().

However, the function install_element_ve() asserts that elements
about to be installed have not already been installed.

This means we cannot shift responsibility into a library context
without first making sure that osmo_fsm commands are only installed
once per combined application+library context, because applications
won't know which commands any of its libraries has already installed.

A simple solution is to use a global flag which is checked by
osmo_fsm_vty_add_cmd() before installing osmo_fsm commands, and
is set once the commands have been installed. This way, no harm
is done if osmo_fsm_vty_add_cmd() is called multiple times.

Change-Id: I10b0b1c1c1bf44c3b8eafc465c1ee06ea2590682
Related: OS#2967
2018-02-23 11:55:54 +01:00
Harald Welte e08da97570 Fix/Update copyright notices; Add SPDX annotation
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.

Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
2017-11-13 01:35:12 +09:00
Harald Welte 8c64825249 [doc] Don't add libosmovty bits to libosmocore groups
Let's not put files of libosmovty into Doxygen groups of libosmocore,
as this seems to confuse Doxygen.  Also, some minor updates/fixes
of libosmovty documentation.

Change-Id: I70e612b8d06aabefe634fcd7861641ffb941d974
2017-10-16 15:17:03 +02:00
Neels Hofmeyr 17518fe393 doxygen: unify use of \file across the board
Considering the various styles and implications found in the sources, edit
scores of files to follow the same API doc guidelines around the doxygen
grouping and the \file tag.

Many files now show a short description in the generated API doc that was so
far only available as C comment.

The guidelines and reasoning behind it is documented at
https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation

In some instances, remove file comments and add to the corresponding group
instead, to be shared among several files (e.g. bitvec).

Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
2017-06-23 00:18:23 +00:00
Neels Hofmeyr 87e4550585 doxygen: enable AUTOBRIEF, drop \brief
Especially for short descriptions, it is annoying to have to type \brief for
every single API doc.

Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes
the first sentence of an API doc as the brief description.

Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
2017-06-23 00:18:22 +00:00
Harald Welte 96e2a00d7a update/extend doxygen documentation
It's a pity that even with this patch we still are fare away from having
the whole API documented.  However, at least we have a more solid
foundation.  Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.

Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
2017-06-12 21:55:54 +00:00
Harald Welte 3419391422 fsm: Add VTY introspection of osmo_fsm and their instances
Change-Id: I89212e4f149f019099115a85bab353c04170df90
2017-01-07 12:21:11 +00:00