aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc/bsc_api.c
diff options
context:
space:
mode:
authorIvan Kluchnikov <kluchnikovi@gmail.com>2017-09-13 13:41:09 +0300
committerIvan Kluchnikov <kluchnikovi@gmail.com>2017-11-24 15:47:30 +0300
commit254a94ea9d3a25e2f48fc3cd772413e252ac87c2 (patch)
treeef0c0b9ea85ecac152cf316eb1051b31fb498585 /openbsc/src/libbsc/bsc_api.c
parent0ca2faafe03fd80baedd380d8b627fd59c1565ce (diff)
handover: Implement proper handover procedure handling at any stage of the callusers/kluchnikov/wip-handover
Diffstat (limited to 'openbsc/src/libbsc/bsc_api.c')
-rw-r--r--openbsc/src/libbsc/bsc_api.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bsc_api.c b/openbsc/src/libbsc/bsc_api.c
index 0c16db303..01fe589af 100644
--- a/openbsc/src/libbsc/bsc_api.c
+++ b/openbsc/src/libbsc/bsc_api.c
@@ -265,11 +265,14 @@ struct gsm_subscriber_connection *bsc_subscr_con_allocate(struct gsm_lchan *lcha
conn->via_ran = RAN_GERAN_A;
lchan->conn = conn;
llist_add_tail(&conn->entry, &net->subscr_conns);
+ INIT_LLIST_HEAD(&conn->ho_queue);
return conn;
}
void bsc_subscr_con_free(struct gsm_subscriber_connection *conn)
{
+ struct msgb *msg;
+
if (!conn)
return;
@@ -295,6 +298,11 @@ void bsc_subscr_con_free(struct gsm_subscriber_connection *conn)
conn->secondary_lchan->conn = NULL;
}
+ while (!llist_empty(&conn->ho_queue)) {
+ msg = msgb_dequeue(&conn->ho_queue);
+ msgb_free(msg);
+ }
+
llist_del(&conn->entry);
talloc_free(conn);
}