LAPD: Make sure we don't re-start SABM timer for INACTIVE SAPs
diff --git a/openbsc/src/input/lapd.c b/openbsc/src/input/lapd.c
index 1212fb3..9bfc2cb 100644
--- a/openbsc/src/input/lapd.c
+++ b/openbsc/src/input/lapd.c
@@ -601,7 +601,8 @@
 
 	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 @@
 	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);