aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/gsm_subscriber_base.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-08 12:51:47 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-12-01 03:37:43 +0100
commit12433453eb3adc27895a0da0347a0599040122b8 (patch)
treeeb3f91bb5f388489fd078775d86ccac0e855bd3e /src/libbsc/gsm_subscriber_base.c
parent78a00a4b7797d46348ffcd5475e6184ecc2c07a8 (diff)
HO: Return "unknown", if subscriber is not set at subscr_name()
This makes things easier when doing tests with fake BTS and fake lchans. There is no need to create any subscriber to test the handover process.
Diffstat (limited to 'src/libbsc/gsm_subscriber_base.c')
-rw-r--r--src/libbsc/gsm_subscriber_base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libbsc/gsm_subscriber_base.c b/src/libbsc/gsm_subscriber_base.c
index 747a699f9..ed2dde6c4 100644
--- a/src/libbsc/gsm_subscriber_base.c
+++ b/src/libbsc/gsm_subscriber_base.c
@@ -43,6 +43,8 @@ struct llist_head *subscr_bsc_active_subscribers(void)
char *subscr_name(struct gsm_subscriber *subscr)
{
+ if (!subscr)
+ return "unknown";
if (strlen(subscr->name))
return subscr->name;