aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc/gsm_04_08.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-03-10 02:15:20 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2017-08-23 14:35:31 +0200
commit78ada64be73f52f68962ebed988f77d9bc027c9e (patch)
treeef08c165279afaa6a3bd334577f36b0e617a4fc6 /src/libmsc/gsm_04_08.c
parent4df72051f9b5c8228520763fdbfcbc0d4df295e8 (diff)
04.08: log protocol discriminators and message types by name
On incoming 04.08 messages, we log only the protocol discriminator in decimal. Enhance: log pdisc and message type in hex, and also log the protocol and message type as human readable string. Also adjust the msc_vlr tests' log statements for wrapped rx/tx functions of dtap from/to the MS. Adjust the expected output of msc_vlr_tests. Change-Id: Ida205d217e304337d816b14fd15e2ee435e7397d Depends: libosmocore change-id I0fca8e95ed5c2148b1a7440eff3fc9c7583898df
Diffstat (limited to 'src/libmsc/gsm_04_08.c')
-rw-r--r--src/libmsc/gsm_04_08.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 3f3f90581..d97bde235 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -3003,10 +3003,10 @@ void cm_service_request_concludes(struct gsm_subscriber_connection *conn,
uint8_t pdisc = gsm48_hdr_pdisc(gh);
uint8_t msg_type = gsm48_hdr_msg_type(gh);
- DEBUGP(DMM, "%s pdisc=%d msg_type=0x%02x:"
+ DEBUGP(DMM, "%s: rx msg %s:"
" received_cm_service_request changes to false\n",
vlr_subscr_name(conn->vsub),
- pdisc, msg_type);
+ gsm48_pdisc_msgtype_name(pdisc, msg_type));
}
conn->received_cm_service_request = false;
}
@@ -3022,14 +3022,16 @@ int gsm0408_dispatch(struct gsm_subscriber_connection *conn, struct msgb *msg)
OSMO_ASSERT(conn);
OSMO_ASSERT(msg);
- LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message, pdisc=%d\n", pdisc);
+ LOGP(DRLL, LOGL_DEBUG, "Dispatching 04.08 message %s (0x%x:0x%x)\n",
+ gsm48_pdisc_msgtype_name(pdisc, gsm48_hdr_msg_type(gh)),
+ pdisc, gsm48_hdr_msg_type(gh));
if (!msc_subscr_conn_is_accepted(conn)
&& !msg_is_initially_permitted(gh)) {
LOGP(DRLL, LOGL_ERROR,
- "subscr %s: Message not permitted for initial conn:"
- " pdisc=0x%02x msg_type=0x%02x\n",
- vlr_subscr_name(conn->vsub), gh->proto_discr, gh->msg_type);
+ "subscr %s: Message not permitted for initial conn: %s\n",
+ vlr_subscr_name(conn->vsub),
+ gsm48_pdisc_msgtype_name(pdisc, gsm48_hdr_msg_type(gh)));
return -EACCES;
}