diff options
author | Harald Welte <laforge@gnumonks.org> | 2009-08-09 14:13:58 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2009-08-09 14:13:58 +0200 |
commit | 1c409273555bfcdd02a58e95c53d3a71a00c7b86 (patch) | |
tree | 8333b14ce99ac971dadcc45c0676661db1fe50db /openbsc/src/bsc_rll.c | |
parent | edcc5273713b92b37b02ae95e5ff70d44af63e76 (diff) |
fix timer and linked list handling of new RLL code
Diffstat (limited to 'openbsc/src/bsc_rll.c')
-rw-r--r-- | openbsc/src/bsc_rll.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/openbsc/src/bsc_rll.c b/openbsc/src/bsc_rll.c index 09c3bc254..57e8c15ce 100644 --- a/openbsc/src/bsc_rll.c +++ b/openbsc/src/bsc_rll.c @@ -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; } |