From 1c409273555bfcdd02a58e95c53d3a71a00c7b86 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 9 Aug 2009 14:13:58 +0200 Subject: fix timer and linked list handling of new RLL code --- openbsc/src/bsc_rll.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'openbsc/src/bsc_rll.c') 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; } -- cgit v1.2.3