Change in osmo-gbproxy[master]: gbproxy_peer: Set rate_ctr name for gbproxy_peer stats

laforge gerrit-no-reply at lists.osmocom.org
Sun Jul 11 17:38:29 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/24905 )

Change subject: gbproxy_peer: Set rate_ctr name for gbproxy_peer stats
......................................................................

gbproxy_peer: Set rate_ctr name for gbproxy_peer stats

Change-Id: I60a5a208ab69ad1184ba643d063717a46a90b131
---
M src/gb_proxy_peer.c
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/gb_proxy_peer.c b/src/gb_proxy_peer.c
index f5ad445..4eb427b 100644
--- a/src/gb_proxy_peer.c
+++ b/src/gb_proxy_peer.c
@@ -70,6 +70,7 @@
 
 struct gbproxy_bvc *gbproxy_bvc_alloc(struct gbproxy_nse *nse, uint16_t bvci)
 {
+	char idbuf[64];
 	struct gbproxy_bvc *bvc;
 	OSMO_ASSERT(nse);
 	struct gbproxy_config *cfg = nse->cfg;
@@ -79,12 +80,16 @@
 	if (!bvc)
 		return NULL;
 
+	snprintf(idbuf, sizeof(idbuf), "BVC%05u-NSE%05u", bvci,
+		 nse->nsei);
+	osmo_identifier_sanitize_buf(idbuf, NULL, '_');
 	bvc->bvci = bvci;
 	bvc->ctrg = rate_ctr_group_alloc(bvc, &bvc_ctrg_desc, (nse->nsei << 16) | bvci);
 	if (!bvc->ctrg) {
 		talloc_free(bvc);
 		return NULL;
 	}
+	rate_ctr_group_set_name(bvc->ctrg, idbuf);
 	bvc->nse = nse;
 
 	hash_add(nse->bvcs, &bvc->list, bvc->bvci);

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/24905
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gbproxy
Gerrit-Branch: master
Gerrit-Change-Id: I60a5a208ab69ad1184ba643d063717a46a90b131
Gerrit-Change-Number: 24905
Gerrit-PatchSet: 2
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210711/fd9ad49e/attachment.htm>


More information about the gerrit-log mailing list