aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/bsc_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libbsc/bsc_api.c')
-rw-r--r--src/libbsc/bsc_api.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/libbsc/bsc_api.c b/src/libbsc/bsc_api.c
index bd55dfc5c..236163bc1 100644
--- a/src/libbsc/bsc_api.c
+++ b/src/libbsc/bsc_api.c
@@ -262,12 +262,15 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lcha
conn->lchan = lchan;
conn->bts = lchan->ts->trx->bts;
lchan->conn = conn;
+ INIT_LLIST_HEAD(&conn->ho_penalty_timers);
llist_add_tail(&conn->entry, &net->subscr_conns);
return conn;
}
void bsc_subscr_con_free(struct gsm_subscriber_connection *conn)
{
+ struct ho_penalty_timer *penalty;
+
if (!conn)
return;
@@ -289,6 +292,13 @@ void bsc_subscr_con_free(struct gsm_subscriber_connection *conn)
conn->secondary_lchan->conn = NULL;
}
+ /* flush handover penalty timers */
+ while ((penalty = llist_first_entry_or_null(&conn->ho_penalty_timers,
+ struct ho_penalty_timer, entry))) {
+ llist_del(&penalty->entry);
+ talloc_free(penalty);
+ }
+
llist_del(&conn->entry);
talloc_free(conn);
}