diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2019-11-09 01:45:11 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2019-11-09 02:14:50 +0700 |
commit | 8eae2fcce0620d3a7a66437161050847ac666812 (patch) | |
tree | cf92782575c749216176d8217718b3366452551b /src/gb/gprs_bssgp.c | |
parent | 7a010b10f7148ce42cead66f9dd4b7901b448418 (diff) |
GPRS/BSSGP: introduce bssgp_bvc_ctx_free()
So far we had a function to allocate a new bssgp_bvc_ctx, but not
the opposite one. Let's finally introduce it, so it will be used
at least in OsmoPCU.
Please note that the new symbol has 'bssgp_' prefix, not 'btsctx_'.
Change-Id: Ia78979379dbdccd6e4628c16f00d0c06d9212172
Diffstat (limited to 'src/gb/gprs_bssgp.c')
-rw-r--r-- | src/gb/gprs_bssgp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gb/gprs_bssgp.c b/src/gb/gprs_bssgp.c index b695c284..896f1c5a 100644 --- a/src/gb/gprs_bssgp.c +++ b/src/gb/gprs_bssgp.c @@ -141,6 +141,15 @@ struct bssgp_bvc_ctx *btsctx_alloc(uint16_t bvci, uint16_t nsei) return ctx; } +void bssgp_bvc_ctx_free(struct bssgp_bvc_ctx *ctx) +{ + if (!ctx) + return; + 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) { |