summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-06-08 12:51:47 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2013-07-29 12:43:49 +0200
commitec1fcb9f5cc0e685ae7f5020a106c3b7c11d426f (patch)
treec62abecfe4d98e5dd370460bd895edde24321db1
parentc69099b3049a2c50a9085f7416a4e6aedf3da23d (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.
-rw-r--r--openbsc/src/libbsc/gsm_subscriber_base.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/src/libbsc/gsm_subscriber_base.c b/openbsc/src/libbsc/gsm_subscriber_base.c
index 747a699f9..ed2dde6c4 100644
--- a/openbsc/src/libbsc/gsm_subscriber_base.c
+++ b/openbsc/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;