mirror of https://gerrit.osmocom.org/libosmocore
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
This commit is contained in:
parent
7a010b10f7
commit
8eae2fcce0
|
@ -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()
|
||||
|
|
|
@ -112,6 +112,8 @@ extern struct llist_head bssgp_bvc_ctxts;
|
|||
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
|
||||
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -80,6 +80,7 @@ gprs_nsvc_state_append;
|
|||
gprs_log_filter_fn;
|
||||
|
||||
btsctx_alloc;
|
||||
bssgp_bvc_ctx_free;
|
||||
btsctx_by_bvci_nsei;
|
||||
btsctx_by_raid_cid;
|
||||
|
||||
|
|
Loading…
Reference in New Issue