diff options
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r-- | openbsc/src/libbsc/bsc_api.c | 8 | ||||
-rw-r--r-- | openbsc/src/libbsc/handover_logic.c | 12 |
2 files changed, 19 insertions, 1 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); } diff --git a/openbsc/src/libbsc/handover_logic.c b/openbsc/src/libbsc/handover_logic.c index ceaf62abc..ebe9d44d2 100644 --- a/openbsc/src/libbsc/handover_logic.c +++ b/openbsc/src/libbsc/handover_logic.c @@ -186,10 +186,17 @@ static void ho_T3103_cb(void *_ho) { struct bsc_handover *ho = _ho; struct gsm_network *net = ho->new_lchan->ts->trx->bts->network; + struct msgb *msg; DEBUGP(DHO, "HO T3103 expired\n"); rate_ctr_inc(&net->bsc_ctrs->ctr[BSC_CTR_HANDOVER_TIMEOUT]); + ho->new_lchan->conn->in_handover = 0; + while (!llist_empty(&ho->new_lchan->conn->ho_queue)) { + msg = msgb_dequeue(&ho->new_lchan->conn->ho_queue); + msgb_free(msg); + } + ho->new_lchan->conn->ho_lchan = NULL; ho->new_lchan->conn = NULL; lchan_release(ho->new_lchan, 0, RSL_REL_LOCAL_END); @@ -214,13 +221,16 @@ static int ho_chan_activ_ack(struct gsm_lchan *new_lchan) gsm48_send_ho_cmd(ho->old_lchan, new_lchan, 0, ho->ho_ref); + new_lchan->conn->in_handover = 1; + /* start T3103. We can continue either with T3103 expiration, * 04.08 HANDOVER COMPLETE or 04.08 HANDOVER FAIL */ osmo_timer_setup(&ho->T3103, ho_T3103_cb, ho); osmo_timer_schedule(&ho->T3103, 10, 0); /* create a RTP connection */ - if (is_ipaccess_bts(new_lchan->ts->trx->bts)) + if (is_ipaccess_bts(new_lchan->ts->trx->bts) && + new_lchan->tch_mode != GSM48_CMODE_SIGN) rsl_ipacc_crcx(new_lchan); return 0; |