aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/chan_alloc.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-06-22 12:11:59 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-22 12:26:35 +0800
commit5ba05f4d26e65eb5e96cf1a8041d0db4760b7445 (patch)
treeac740ef3c4b68f4cf409d483f71708606ea67d6c /openbsc/src/chan_alloc.c
parent4df2ad9ac6153b2104dcb3e1ae0d27e44125b32e (diff)
abis_rsl: Send the IMMEDIATE Assignment after the Channel Ack.
The Channel Activate might be sent to a different TRX than the Immediate Assignment. So we need to make sure that the channel is activated before we send the immediate assignment for the RACH. Another reason for that is according to GSM 08.58 we should take the frame number from the activate and use it for the starting time inside the immediate assignment message. We obviously do not do this yet. The code assumes that the BTS will either respond with a CHAN ACK or a CHAN NACK if not the lchan will remain in the request state.
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 d6e4ff172..c59c0a1f9 100644
--- a/openbsc/src/chan_alloc.c
+++ b/openbsc/src/chan_alloc.c
@@ -33,6 +33,8 @@
#include <openbsc/debug.h>
#include <openbsc/signal.h>
+#include <osmocore/talloc.h>
+
static void auto_release_channel(void *_lchan);
static int ts_is_usable(struct gsm_bts_trx_ts *ts)
@@ -320,6 +322,12 @@ void lchan_free(struct gsm_lchan *lchan)
for (i = 0; i < ARRAY_SIZE(lchan->neigh_meas); i++)
lchan->neigh_meas[i].arfcn = 0;
+ if (lchan->rqd_ref) {
+ talloc_free(lchan->rqd_ref);
+ lchan->rqd_ref = NULL;
+ lchan->rqd_ta = 0;
+ }
+
lchan->conn.silent_call = 0;
sig.lchan = lchan;