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

daniel gerrit-no-reply at lists.osmocom.org
Fri Jul 9 16:46:11 UTC 2021


daniel has uploaded this change for review. ( 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(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-gbproxy refs/changes/05/24905/1

diff --git a/src/gb_proxy_peer.c b/src/gb_proxy_peer.c
index 0b2ab2b..72418c1 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[256];
 	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: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210709/29d69a30/attachment.htm>


More information about the gerrit-log mailing list