diff options
author | Harald Welte <laforge@gnumonks.org> | 2017-10-03 17:46:14 +0800 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-10-24 16:00:45 +0000 |
commit | ae510dc4a743e981b40fc5e1fdb4c109f2425e27 (patch) | |
tree | 76af91250b31b14196c965fe1fc8bc130931728d /include/osmocom | |
parent | 8c4f5457aa185bc9d74b6962aaafdd263ea6af56 (diff) |
rate_ctr: Enforce counter (and ctr_group) names are valid identifiers
As rate counters are automatically exposed on the CTRL interface,
we need to make sure they don't contain special characters such as '.'
which are not permitted/supported by CTRL.
In order to be able to run old versions of osmocom programs with
libosmocore versions after this commit, we introduce some special
name mangling: Any '.' in the names are replaced with ':' during
counter group registration, if valid identifiers can be obtained
this way.
Change-Id: Ifc6ac824f5dae9a848bb4a5d067c64a69eb40b56
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/core/rate_ctr.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/rate_ctr.h b/include/osmocom/core/rate_ctr.h index 74414e98..6ce2dfed 100644 --- a/include/osmocom/core/rate_ctr.h +++ b/include/osmocom/core/rate_ctr.h @@ -48,7 +48,7 @@ struct rate_ctr_group_desc { /*! The class to which this group belongs */ int class_id; /*! The number of counters in this group */ - const unsigned int num_ctr; + unsigned int num_ctr; /*! Pointer to array of counter names */ const struct rate_ctr_desc *ctr_desc; }; |