summaryrefslogtreecommitdiffstats
path: root/openbsc/src
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src')
-rw-r--r--openbsc/src/libbsc/abis_rsl.c2
-rw-r--r--openbsc/src/libcommon/gsm_subscriber_base.c3
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c7
3 files changed, 6 insertions, 6 deletions
diff --git a/openbsc/src/libbsc/abis_rsl.c b/openbsc/src/libbsc/abis_rsl.c
index 6cf4e0b04..c3a0c5c10 100644
--- a/openbsc/src/libbsc/abis_rsl.c
+++ b/openbsc/src/libbsc/abis_rsl.c
@@ -1051,7 +1051,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);
diff --git a/openbsc/src/libcommon/gsm_subscriber_base.c b/openbsc/src/libcommon/gsm_subscriber_base.c
index 50f411888..1f98cc66c 100644
--- a/openbsc/src/libcommon/gsm_subscriber_base.c
+++ b/openbsc/src/libcommon/gsm_subscriber_base.c
@@ -43,6 +43,9 @@ 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;
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 0f00db151..68cc906fe 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -447,8 +447,7 @@ int gsm0408_loc_upd_rej(struct gsm_subscriber_connection *conn, uint8_t cause)
msg->lchan = conn->lchan;
LOGP(DMM, LOGL_INFO, "Subscriber %s: LOCATION UPDATING REJECT "
- "LAC=%u BTS=%u\n", conn->subscr ?
- subscr_name(conn->subscr) : "unknown",
+ "LAC=%u BTS=%u\n", subscr_name(conn->subscr),
bts->location_area_code, bts->nr);
return gsm48_conn_sendmsg(msg, conn, NULL);
@@ -1153,9 +1152,7 @@ static int gsm0408_rcv_mm(struct gsm_subscriber_connection *conn, struct msgb *m
break;
case GSM48_MT_MM_TMSI_REALL_COMPL:
DEBUGP(DMM, "TMSI Reallocation Completed. Subscriber: %s\n",
- conn->subscr ?
- subscr_name(conn->subscr) :
- "unknown subscriber");
+ subscr_name(conn->subscr));
release_loc_updating_req(conn, 1);
break;
case GSM48_MT_MM_IMSI_DETACH_IND: