Change in libosmocore[master]: GPRS/BSSGP: introduce bssgp_bvc_ctx_free()

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Fri Nov 8 18:45:36 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16017 )


Change subject: GPRS/BSSGP: introduce bssgp_bvc_ctx_free()
......................................................................

GPRS/BSSGP: introduce bssgp_bvc_ctx_free()

Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172
---
M TODO-RELEASE
M include/osmocom/gprs/gprs_bssgp.h
M src/gb/gprs_bssgp.c
M src/gb/libosmogb.map
4 files changed, 11 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/17/16017/1

diff --git a/TODO-RELEASE b/TODO-RELEASE
index 9af92c1..692bdc1 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,3 +10,4 @@
 core		osmo_tdef_get()		change val_if_not_present arg from unsigned long to long to allow passing -1
 core		struct osmo_tdef	fields min_val,max_val added, ABI break (arrays of structs used in programs)
 gsm		API added		osmo_gsm48_rfpowercap2powerclass()
+gb		API added		bssgp_bvc_ctx_free()
diff --git a/include/osmocom/gprs/gprs_bssgp.h b/include/osmocom/gprs/gprs_bssgp.h
index 400c3e0..0f87333 100644
--- a/include/osmocom/gprs/gprs_bssgp.h
+++ b/include/osmocom/gprs/gprs_bssgp.h
@@ -112,6 +112,8 @@
 struct bssgp_bvc_ctx *btsctx_by_raid_cid(const struct gprs_ra_id *raid, uint16_t cid);
 /* Find a BTS context based on BVCI+NSEI tuple */
 struct bssgp_bvc_ctx *btsctx_by_bvci_nsei(uint16_t bvci, uint16_t nsei);
+/* Free a given BTS context */
+void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx);
 
 #define BVC_F_BLOCKED	0x0001
 
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c
index b695c28..d98e4fa 100644
--- a/src/gb/gprs_bssgp.c
+++ b/src/gb/gprs_bssgp.c
@@ -141,6 +141,13 @@
 	return ctx;
 }
 
+void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx)
+{
+	rate_ctr_group_free(ctx->ctrg);
+	llist_del(&ctx->list);
+	talloc_free(ctx);
+}
+
 /* Chapter 10.4.5: Flow Control BVC ACK */
 static int bssgp_tx_fc_bvc_ack(uint16_t nsei, uint8_t tag, uint16_t ns_bvci)
 {
diff --git a/src/gb/libosmogb.map b/src/gb/libosmogb.map
index 5e675a6..ad139c1 100644
--- a/src/gb/libosmogb.map
+++ b/src/gb/libosmogb.map
@@ -80,6 +80,7 @@
 gprs_log_filter_fn;
 
 btsctx_alloc;
+bssgp_bvc_ctx_free;
 btsctx_by_bvci_nsei;
 btsctx_by_raid_cid;
 

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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172
Gerrit-Change-Number: 16017
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191108/d0fb1539/attachment.htm>


More information about the gerrit-log mailing list