summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2017-07-21 18:49:12 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2017-07-21 18:49:12 +0200
commite773bff7cea7ca8ac80055095396e5275ba2ee1e (patch)
tree3a7cae7fb8f80f3beb34e0cb9cd5076ab947d1d7
parentd93ee55ecfbf834ed71bdf830d5f1de5982d893a (diff)
gsm04_08.c patches from neels (remove when committed properly)pmaier/aoip2
0001-imsi-detach-improve-error-logging.patch 0002-imsi-detach-always-close-connection-explicitly.patch
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index c310453e4..aeb7c7b44 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -748,28 +748,28 @@ static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, s
struct vlr_subscr *vsub = NULL;
gsm48_mi_to_string(mi_string, sizeof(mi_string), idi->mi, idi->mi_len);
- DEBUGP(DMM, "IMSI DETACH INDICATION: MI(%s)=%s",
- gsm48_mi_type_name(mi_type), mi_string);
+ DEBUGP(DMM, "IMSI DETACH INDICATION: MI(%s)=%s\n",
+ gsm48_mi_type_name(mi_type), mi_string);
rate_ctr_inc(&network->msc_ctrs->ctr[MSC_CTR_LOC_UPDATE_TYPE_DETACH]);
switch (mi_type) {
case GSM_MI_TYPE_TMSI:
- DEBUGPC(DMM, "\n");
vsub = vlr_subscr_find_by_tmsi(network->vlr,
tmsi_from_string(mi_string));
break;
case GSM_MI_TYPE_IMSI:
- DEBUGPC(DMM, "\n");
vsub = vlr_subscr_find_by_imsi(network->vlr, mi_string);
break;
case GSM_MI_TYPE_IMEI:
case GSM_MI_TYPE_IMEISV:
/* no sim card... FIXME: what to do ? */
- DEBUGPC(DMM, ": unimplemented mobile identity type\n");
+ LOGP(DMM, LOGL_ERROR, "MI(%s)=%s: unimplemented mobile identity type\n",
+ gsm48_mi_type_name(mi_type), mi_string);
break;
default:
- DEBUGPC(DMM, ": unknown mobile identity type\n");
+ LOGP(DMM, LOGL_ERROR, "MI(%s)=%s: unknown mobile identity type\n",
+ gsm48_mi_type_name(mi_type), mi_string);
break;
}
@@ -779,16 +779,16 @@ static int gsm48_rx_mm_imsi_detach_ind(struct gsm_subscriber_connection *conn, s
conn->classmark.classmark1 = idi->classmark1;
if (!vsub) {
- DEBUGP(DMM, "Unknown Subscriber ?!?\n");
- return 0;
+ LOGP(DMM, LOGL_ERROR, "IMSI DETACH for unknown subscriber MI(%s)=%s\n",
+ gsm48_mi_type_name(mi_type), mi_string);
+ } else {
+ LOGP(DMM, LOGL_INFO, "Subscriber %s DETACHED\n",
+ vlr_subscr_name(vsub));
+ vlr_subscr_rx_imsi_detach(vsub);
+ osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_DETACHED, vsub);
+ vlr_subscr_put(vsub);
}
- LOGP(DMM, LOGL_INFO, "Subscriber %s DETACHED\n",
- vlr_subscr_name(vsub));
- vlr_subscr_rx_imsi_detach(vsub);
- osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_DETACHED, vsub);
- vlr_subscr_put(vsub);
-
msc_subscr_conn_close(conn, 0);
return 0;
}