aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/input
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-02-13 15:42:07 +0100
committerHarald Welte <laforge@gnumonks.org>2011-02-13 15:49:27 +0100
commit909212fc878bcb1bdedc52ee2dbf57192efaae96 (patch)
treec93ccec4d358356dffc8cb1208ee743e9a0b8995 /openbsc/src/input
parentc834b70d04f0d5d66a3616a51cee577ebb7fede4 (diff)
LAPD: Make sure we don't re-start SABM timer for INACTIVE SAPs
Diffstat (limited to 'openbsc/src/input')
-rw-r--r--openbsc/src/input/lapd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbsc/src/input/lapd.c b/openbsc/src/input/lapd.c
index 1212fb369..9bfc2cb4a 100644
--- a/openbsc/src/input/lapd.c
+++ b/openbsc/src/input/lapd.c
@@ -601,7 +601,8 @@ static void sabme_timer_cb(void *_sap)
lapd_send_sabm(sap->tei->li, sap->tei->tei, sap->sapi);
- bsc_schedule_timer(&sap->sabme_timer, SABM_INTERVAL);
+ if (sap->state == SAP_STATE_SABM_RETRANS)
+ bsc_schedule_timer(&sap->sabme_timer, SABM_INTERVAL);
}
/* Start a (user-side) SAP for the specified TEI/SAPI on the LAPD instance */
@@ -639,7 +640,7 @@ int lapd_sap_stop(struct lapd_instance *li, uint8_t tei, uint8_t sapi)
if (!sap)
return -ENODEV;
- bsc_del_timer(&sap->sabme_timer);
+ lapd_sap_set_state(teip, sapi, SAP_STATE_INACTIVE);
llist_del(&sap->list);
talloc_free(sap);