diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-12-27 13:46:48 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2011-01-06 14:52:51 +0100 |
commit | ebd50a6fd23c630ae9db13851b986fa7aebc2f62 (patch) | |
tree | e45845615735d2f55a48bd4d6235a0f936808cb7 /openbsc/src/bsc_api.c | |
parent | f1ba09b2e60a0f77ae142d62e8c5bcd0c294d35a (diff) |
bsc: Clear the hand-over in case the new_lchan is failing
When the new_lchan for handover is failing we should stop the
handover operation. This is fixing a crash that we get a timeout
on the lchan and have no conn set to it. Introduce a flag to
the bsc_clear_handover to not free the lchan. In case the ho_lchan
is failing we do not want to call lchan_release as it would
reset the state.
Diffstat (limited to 'openbsc/src/bsc_api.c')
-rw-r--r-- | openbsc/src/bsc_api.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/bsc_api.c b/openbsc/src/bsc_api.c index 73b29b5ff..a9e5f71ed 100644 --- a/openbsc/src/bsc_api.c +++ b/openbsc/src/bsc_api.c @@ -520,7 +520,7 @@ int gsm0808_cipher_mode(struct gsm_subscriber_connection *conn, int cipher, int gsm0808_clear(struct gsm_subscriber_connection *conn) { if (conn->ho_lchan) - bsc_clear_handover(conn); + bsc_clear_handover(conn, 1); if (conn->secondary_lchan) lchan_release(conn->secondary_lchan, 0, 1); @@ -633,8 +633,10 @@ static void handle_release(struct gsm_subscriber_connection *conn, /* now give up all channels */ if (conn->lchan == lchan) conn->lchan = NULL; - if (conn->ho_lchan == lchan) + if (conn->ho_lchan == lchan) { + bsc_clear_handover(conn, 0); conn->ho_lchan = NULL; + } lchan->conn = NULL; gsm0808_clear(conn); |