aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/libbsc
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-28 14:04:36 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-03 16:19:07 +0100
commit5331cf8dbdae6b29df50556c362462b973e93917 (patch)
treefa46cbaef836cdbf616efe69e971cd334614bfb6 /openbsc/src/libbsc
parentcf8e56cd1e057a39a5acdc6f78b9a69bb1b4c281 (diff)
subscr_name(): Handle case for subscr == NULL
subscr_name() was called from several places: * either without a check for subscr being NULL, which for example was causing a segfault if we hand-over a channel before identifying the subscriber * or with an explicit NULL check and the ternary operator (?). We now simplify the code by checking for the NULL Subscriber in subscr_name() itself.
Diffstat (limited to 'openbsc/src/libbsc')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 8e9258ca5..10e15c889 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1048,7 +1048,7 @@ static void print_meas_rep(struct gsm_lchan *lchan, struct gsm_meas_rep *mr)
int i;
char *name = "";
- if (lchan && lchan->conn && lchan->conn->subscr)
+ if (lchan && lchan->conn)
name = subscr_name(lchan->conn->subscr);
DEBUGP(DMEAS, "[%s] MEASUREMENT RESULT NR=%d ", name, mr->nr);