diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-12-19 01:02:47 +0100 |
---|---|---|
committer | gsmevent admin <admin@gsmevent.box> | 2018-12-24 15:45:51 +0100 |
commit | 1fbf45c291f7e1f09ef2e862abfeca6a23efdc03 (patch) | |
tree | 63cee4be7e3d8160082ca15fc4317c7a9d02175e /src/libmsc/gsm_04_08.c | |
parent | 4fdefe537d23639aab33192f2c3bd4dbc61c4392 (diff) |
enrich context for vlr_subscr_name and ran_conn fi name
Include all available information in vlr_subscr_name(); instead of either IMSI
or MSISDN or TMSI, print all of them when present. Instead of a short log,
rather have more valuable context.
A context info would now look like:
Process_Access_Request_VLR(GERAN-A-3_IMSI-901700000014706_MSISDN-2023_TMSI-0x08bde4ec_PAGING_RESP)
It does get quite long, but ensures easy correlation of any BSSAP / IuCS
messages with log output, especially if multiple subscribers are busy at the
same time.
When showing the RAN conn id, instead of
GERAN_A-00000017
write
GERAN-A-23
- We usually write the conn_id in decimal.
- Leading zeros are clutter.
- Don't mix - and _ separators.
These changes are combined to produce only one burst of humungous amounts of
msc_vlr_tests expected output. That is definitely a weak point of these tests:
blowing up the git history. OTOH they do show logging changes nicely.
Change-Id: I66a68ce2eb8957a35855a3743d91a86299900834
Diffstat (limited to 'src/libmsc/gsm_04_08.c')
-rw-r--r-- | src/libmsc/gsm_04_08.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c index dc0476b55..9370c56cb 100644 --- a/src/libmsc/gsm_04_08.c +++ b/src/libmsc/gsm_04_08.c @@ -354,7 +354,8 @@ int mm_rx_loc_upd_req(struct ran_conn *conn, struct msgb *msg) return -EINVAL; } - ran_conn_update_id(conn, COMPLETE_LAYER3_LU, mi_string); + conn->complete_layer3_type = COMPLETE_LAYER3_LU; + ran_conn_update_id(conn); DEBUGP(DMM, "LOCATION UPDATING REQUEST: MI(%s)=%s type=%s\n", gsm48_mi_type_name(mi_type), mi_string, @@ -688,7 +689,7 @@ accept_reuse: conn->received_cm_service_request = true; ran_conn_get(conn, RAN_CONN_USE_CM_SERVICE); } - ran_conn_update_id(conn, conn->complete_layer3_type, mi_string); + ran_conn_update_id(conn); return conn->network->vlr->ops.tx_cm_serv_acc(conn); } @@ -781,7 +782,8 @@ int gsm48_rx_mm_serv_req(struct ran_conn *conn, struct msgb *msg) /* or should we accept and note down the service request anyway? */ } - ran_conn_update_id(conn, COMPLETE_LAYER3_CM_SERVICE_REQ, mi_string); + conn->complete_layer3_type = COMPLETE_LAYER3_CM_SERVICE_REQ; + ran_conn_update_id(conn); osmo_signal_dispatch(SS_SUBSCR, S_SUBSCR_IDENTITY, mi_p); @@ -1183,7 +1185,8 @@ static int gsm48_rx_rr_pag_resp(struct ran_conn *conn, struct msgb *msg) DEBUGP(DRR, "PAGING RESPONSE: MI(%s)=%s\n", gsm48_mi_type_name(mi_type), mi_string); - ran_conn_update_id(conn, COMPLETE_LAYER3_PAGING_RESP, mi_string); + conn->complete_layer3_type = COMPLETE_LAYER3_PAGING_RESP; + ran_conn_update_id(conn); is_utran = (conn->via_ran == RAN_UTRAN_IU); vlr_proc_acc_req(conn->fi, @@ -1745,6 +1748,7 @@ static void msc_vlr_subscr_update(struct vlr_subscr *subscr) { LOGVSUBP(LOGL_NOTICE, subscr, "VLR: update for IMSI=%s (MSISDN=%s, used=%d)\n", subscr->imsi, subscr->msisdn, subscr->use_count); + ran_conn_update_id_for_vsub(subscr); } static void update_classmark(const struct gsm_classmark *src, struct gsm_classmark *dst) @@ -1778,6 +1782,8 @@ static void msc_vlr_subscr_assoc(void *msc_conn_ref, * associated with the conn: merge the new Classmark into vsub->classmark. Don't overwrite valid * vsub->classmark with unset classmark, though. */ update_classmark(&conn->temporary_classmark, &conn->vsub->classmark); + + ran_conn_update_id(conn); } static int msc_vlr_route_gsup_msg(struct vlr_subscr *vsub, |