summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2016-11-11 19:42:19 +0100
committerHarald Welte <laforge@gnumonks.org>2016-11-11 21:20:49 +0100
commitc1efa67c131a005903821a7487bad014b90cbe08 (patch)
tree9a18bfb8878dad82b5af06e6cac9c2b323b0781d
parentdfe48fdecf5e953fa5c08053e8781d4daf6ad4a4 (diff)
RBS2000: Avoid segfault if ts->lapd instance doesn't exist
This happens e.g. with DAHDI driver, when the DAHDI device cannot be opened. Let's not prematurely seg-fault early in the RBS2000 signal handler, but take the proper error handlign for this. Change-Id: I9223fb1568d3db7e278f07240c4be334c6602a13
-rw-r--r--openbsc/src/libbsc/bts_ericsson_rbs2000.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/bts_ericsson_rbs2000.c b/openbsc/src/libbsc/bts_ericsson_rbs2000.c
index 1300b4a65..faf6f05dc 100644
--- a/openbsc/src/libbsc/bts_ericsson_rbs2000.c
+++ b/openbsc/src/libbsc/bts_ericsson_rbs2000.c
@@ -71,6 +71,8 @@ static void start_sabm_in_line(struct e1inp_line *line, int start)
continue;
llist_for_each_entry(link, &ts->sign.sign_links, list) {
+ if (!ts->lapd)
+ continue;
lapd_instance_set_profile(ts->lapd,
&lapd_profile_abis_ericsson);