aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/chan_alloc.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-30 12:40:10 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-30 12:59:20 +0800
commite071ab70e97831a7efdb7351497f6da2f95efc94 (patch)
tree72bb24d476bec981fe9ed8a91e4b798885c169c1 /openbsc/src/chan_alloc.c
parentd06516557a8982c645b4d0f5a76dd806f1ddd76d (diff)
handover: Attempt to use the same gsm_subscriber_conn for new/old channel
The transaction should not know on which lchan we are operating as this can change due handover. Add untested code to share the subscriber connection of the new and old lchan and move the pointer in case of success/failure. Also on a clear command we will free any resources allocated... This code is not tested and needs to be debugged, but it should have the right structure. I am going to fix a potential memleak in the next commit.
Diffstat (limited to 'openbsc/src/chan_alloc.c')
-rw-r--r--openbsc/src/chan_alloc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/openbsc/src/chan_alloc.c b/openbsc/src/chan_alloc.c
index 62d476ad9..675cbbb1d 100644
--- a/openbsc/src/chan_alloc.c
+++ b/openbsc/src/chan_alloc.c
@@ -478,6 +478,14 @@ void subscr_con_free(struct gsm_subscriber_connection *conn)
}
+ /* Release a handover that might be in operation */
+ if (conn->ho_lchan) {
+ conn->ho_lchan->conn = NULL;
+ lchan_release(conn->ho_lchan, 0, 1);
+ conn->ho_lchan = NULL;
+ }
+
+
lchan = conn->lchan;
talloc_free(conn);