bts_nokia_site: Fix LAPD segfault during reset procedure
The existing Nokia *Site code destroyed the LAPD SAP instance for OML
while processing an OML message. Once the stack frame returned back
to the LAPD code, the LAPD SAP was gone -> segfault.
Let's work around this by moving deletion of the LAPD SAP out-of-line
by starting a timer 0ms in the future. Not particularly nice, but
effective.
Change-Id: I6270c7210f600e53f845561898245d2fd30a368d
Closes: OS#1761
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 6996905..1d02e39 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -1143,7 +1143,7 @@
no_loc_rel_cnf:1, /* don't wait for RSL REL CONF */
bts_reset_timer_cnf, /* timer for BTS RESET */
did_reset:1, /* we received a RESET ACK */
- wait_reset:1; /* we are waiting for reset to complete */
+ wait_reset:2; /* we are waiting for reset to complete */
struct osmo_timer_list reset_timer;
} nokia;
};