laforge has submitted this change. (
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(-)
Approvals:
Jenkins Builder: Verified
fixeria: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
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
https://gerrit.osmocom.org/c/libosmocore/+/28069
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2986313375daec1c4959a6a914e3fb2980a5d7ca
Gerrit-Change-Number: 28069
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged