Change in openbsc[master]: bsc-nat: Replace '.' in counter names with ':'

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jun 27 19:05:01 UTC 2018


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/9752 )

Change subject: bsc-nat: Replace '.' in counter names with ':'
......................................................................

bsc-nat: Replace '.' in counter names with ':'

The '.' is illegal character in counter names, as they are exported
via CTRL interface, where '.' has a special meaning that cannot be
used by strings comprising the variable name.

Change-Id: I55470ae74d350e4020209921fd8a09b51b120a41
---
M openbsc/src/libfilter/bsc_msg_acc.c
M openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
2 files changed, 17 insertions(+), 17 deletions(-)

Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved



diff --git a/openbsc/src/libfilter/bsc_msg_acc.c b/openbsc/src/libfilter/bsc_msg_acc.c
index bfc5bdd..7b658e4 100644
--- a/openbsc/src/libfilter/bsc_msg_acc.c
+++ b/openbsc/src/libfilter/bsc_msg_acc.c
@@ -27,12 +27,12 @@
 #include <string.h>
 
 static const struct rate_ctr_desc acc_list_ctr_description[] = {
-	[ACC_LIST_LOCAL_FILTER]	= { "access-list.local-filter", "Rejected by rule for local"},
-	[ACC_LIST_GLOBAL_FILTER]= { "access-list.global-filter", "Rejected by rule for global"},
+	[ACC_LIST_LOCAL_FILTER]	= { "access-list:local-filter", "Rejected by rule for local"},
+	[ACC_LIST_GLOBAL_FILTER]= { "access-list:global-filter", "Rejected by rule for global"},
 };
 
 static const struct rate_ctr_group_desc bsc_cfg_acc_list_desc = {
-	.group_name_prefix = "nat.filter",
+	.group_name_prefix = "nat:filter",
 	.group_description = "NAT Access-List Statistics",
 	.num_ctr = ARRAY_SIZE(acc_list_ctr_description),
 	.ctr_desc = acc_list_ctr_description,
diff --git a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
index c12b29f..5a06d3f 100644
--- a/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
+++ b/openbsc/src/osmo-bsc_nat/bsc_nat_utils.c
@@ -46,23 +46,23 @@
 #include <unistd.h>
 
 static const struct rate_ctr_desc bsc_cfg_ctr_description[] = {
-	[BCFG_CTR_SCCP_CONN]     = { "sccp.conn",      "SCCP Connections         "},
-	[BCFG_CTR_SCCP_CALLS]    = { "sccp.calls",     "SCCP Assignment Commands "},
-	[BCFG_CTR_NET_RECONN]    = { "net.reconnects", "Network reconnects       "},
-	[BCFG_CTR_DROPPED_SCCP]  = { "dropped.sccp",   "Dropped SCCP connections."},
-	[BCFG_CTR_DROPPED_CALLS] = { "dropped.calls",  "Dropped active calls.    "},
-	[BCFG_CTR_REJECTED_CR]   = { "rejected.cr",    "Rejected CR due filter   "},
-	[BCFG_CTR_REJECTED_MSG]  = { "rejected.msg",   "Rejected MSG due filter  "},
-	[BCFG_CTR_ILL_PACKET]    = { "rejected.ill",   "Rejected due parse error "},
-	[BCFG_CTR_CON_TYPE_LU]   = { "conn.lu",        "Conn Location Update     "},
-	[BCFG_CTR_CON_CMSERV_RQ] = { "conn.rq",        "Conn CM Service Req      "},
-	[BCFG_CTR_CON_PAG_RESP]  = { "conn.pag",       "Conn Paging Response     "},
-	[BCFG_CTR_CON_SSA]       = { "conn.ssa",       "Conn USSD                "},
-	[BCFG_CTR_CON_OTHER]     = { "conn.other",     "Conn Other               "},
+	[BCFG_CTR_SCCP_CONN]     = { "sccp:conn",      "SCCP Connections         "},
+	[BCFG_CTR_SCCP_CALLS]    = { "sccp:calls",     "SCCP Assignment Commands "},
+	[BCFG_CTR_NET_RECONN]    = { "net:reconnects", "Network reconnects       "},
+	[BCFG_CTR_DROPPED_SCCP]  = { "dropped:sccp",   "Dropped SCCP connections."},
+	[BCFG_CTR_DROPPED_CALLS] = { "dropped:calls",  "Dropped active calls.    "},
+	[BCFG_CTR_REJECTED_CR]   = { "rejected:cr",    "Rejected CR due filter   "},
+	[BCFG_CTR_REJECTED_MSG]  = { "rejected:msg",   "Rejected MSG due filter  "},
+	[BCFG_CTR_ILL_PACKET]    = { "rejected:ill",   "Rejected due parse error "},
+	[BCFG_CTR_CON_TYPE_LU]   = { "conn:lu",        "Conn Location Update     "},
+	[BCFG_CTR_CON_CMSERV_RQ] = { "conn:rq",        "Conn CM Service Req      "},
+	[BCFG_CTR_CON_PAG_RESP]  = { "conn:pag",       "Conn Paging Response     "},
+	[BCFG_CTR_CON_SSA]       = { "conn:ssa",       "Conn USSD                "},
+	[BCFG_CTR_CON_OTHER]     = { "conn:other",     "Conn Other               "},
 };
 
 static const struct rate_ctr_group_desc bsc_cfg_ctrg_desc = {
-	.group_name_prefix = "nat.bsc",
+	.group_name_prefix = "nat:bsc",
 	.group_description = "NAT BSC Statistics",
 	.num_ctr = ARRAY_SIZE(bsc_cfg_ctr_description),
 	.ctr_desc = bsc_cfg_ctr_description,

-- 
To view, visit https://gerrit.osmocom.org/9752
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I55470ae74d350e4020209921fd8a09b51b120a41
Gerrit-Change-Number: 9752
Gerrit-PatchSet: 2
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180627/e8da6a55/attachment.htm>


More information about the gerrit-log mailing list