aboutsummaryrefslogtreecommitdiffstats
path: root/src/vty
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-05-08 09:57:39 +0200
committerHarald Welte <laforge@osmocom.org>2022-05-08 10:02:43 +0200
commit8f25fd27ed35d6cb47b5e57aea632d088b69bfe0 (patch)
tree26ae5355d693ffca19aacc678105d0755afefc22 /src/vty
parente8e24c7be907d3e946d0982cca40888fce88848f (diff)
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
Diffstat (limited to 'src/vty')
-rw-r--r--src/vty/stats_vty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vty/stats_vty.c b/src/vty/stats_vty.c
index a4e4fcee..e5acfa2c 100644
--- a/src/vty/stats_vty.c
+++ b/src/vty/stats_vty.c
@@ -671,6 +671,11 @@ static int config_write_stats_reporter(struct vty *vty, struct osmo_stats_report
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);