laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/28069 )
Change subject: stats: don't try to save unknown stats reporter types ......................................................................
stats: don't try to save unknown stats reporter types
The point of having a public API to register further stats reporters is to enable applications or other libraries to do so. As we in libosmocore don't know anything about the parameters of such a stats reporter, don't try to do a partial save of them when saving the config file.
Change-Id: I2986313375daec1c4959a6a914e3fb2980a5d7ca --- M src/vty/stats_vty.c 1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/69/28069/1
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c index a4e4fce..e5acfa2 100644 --- a/src/vty/stats_vty.c +++ b/src/vty/stats_vty.c @@ -671,6 +671,11 @@ case OSMO_STATS_REPORTER_LOG: type = "log"; break; + default: + /* don't try to save unknown stats reporters to the VTY. Imagine some + * application registering a new application specific stats reporter that + * this VTY code knows nothing about! */ + return 0; }
vty_out(vty, "stats reporter %s", type);