fix timer and linked list handling of new RLL code
This commit is contained in:
parent
ed9a5ab5bb
commit
61402172fc
|
@ -849,7 +849,7 @@ int rsl_establish_request(struct gsm_lchan *lchan, u_int8_t link_id)
|
|||
struct abis_rsl_rll_hdr *rh;
|
||||
|
||||
rh = (struct abis_rsl_rll_hdr *) msgb_put(msg, sizeof(*rh));
|
||||
init_llm_hdr(rh, RSL_MT_REL_REQ);
|
||||
init_llm_hdr(rh, RSL_MT_EST_REQ);
|
||||
//rh->c.msg_discr |= ABIS_RSL_MDISC_TRANSP;
|
||||
rh->chan_nr = lchan2chan_nr(lchan);
|
||||
rh->link_id = link_id;
|
||||
|
@ -1276,7 +1276,7 @@ static int abis_rsl_rx_rll(struct msgb *msg)
|
|||
}
|
||||
break;
|
||||
case RSL_MT_EST_CONF:
|
||||
DEBUGPC(DRLL, "ESTABLISH CONFIRMATION\n");
|
||||
DEBUGPC(DRLL, "ESTABLISH CONFIRM\n");
|
||||
rll_indication(msg->lchan, rllh->link_id,
|
||||
BSC_RLLR_IND_EST_CONF);
|
||||
break;
|
||||
|
|
|
@ -80,8 +80,11 @@ int rll_establish(struct gsm_lchan *lchan, u_int8_t link_id,
|
|||
rllr->cb = cb;
|
||||
rllr->data = data;
|
||||
|
||||
llist_add(&rllr->list, &bsc_rll_reqs);
|
||||
|
||||
rllr->timer.cb = &timer_cb;
|
||||
/* start some timer? */
|
||||
rllr->timer.data = rllr;
|
||||
|
||||
bsc_schedule_timer(&rllr->timer, 10, 0);
|
||||
|
||||
/* send the RSL RLL ESTablish REQuest */
|
||||
|
@ -97,6 +100,7 @@ void rll_indication(struct gsm_lchan *lchan, u_int8_t link_id, u_int8_t type)
|
|||
llist_for_each_entry_safe(rllr, rllr2, &bsc_rll_reqs, list) {
|
||||
if (rllr->lchan == lchan &&
|
||||
(rllr->link_id & LINKID_MASK) == (link_id & LINKID_MASK)) {
|
||||
bsc_del_timer(&rllr->timer);
|
||||
complete_rllr(rllr, type);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue