laforge submitted this change.
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(-)
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);
To view, visit change 28069. To unsubscribe, or for help writing mail filters, visit settings.