diff options
author | Philipp <pmaier@sysmocom.de> | 2016-09-28 12:57:00 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-10-12 10:17:43 +0000 |
commit | 93f3102da9c112708808a21a9889166240a6f6dd (patch) | |
tree | 6eca1fe7656d8a61c08ab62f2be86d550adcf70c | |
parent | b8b939faa963973d5e34021dfe6cae357669a9a6 (diff) |
rsl: improving the log output
to show more details about the payload type and the connection
Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd
-rw-r--r-- | src/common/rsl.c | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/common/rsl.c b/src/common/rsl.c index 0f16f7d8..d2fea120 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -1584,21 +1584,34 @@ static int rsl_rx_ipac_XXcx(struct msgb *msg) return tx_ipac_XXcx_nack(lchan, RSL_ERR_MAND_IE_ERROR, 0, dch->c.msg_type); - /* any of these can be NULL!! */ - speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE); - payload_type = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD); - payload_type2 = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD2); - - if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_IP)) + if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_IP)) { connect_ip = tlvp_val32_unal(&tp, RSL_IE_IPAC_REMOTE_IP); + LOGP(DRSL, LOGL_NOTICE, "connect_ip %d \n", connect_ip ); + } else LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote IP\n"); - if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_PORT)) + if (TLVP_PRESENT(&tp, RSL_IE_IPAC_REMOTE_PORT)) { connect_port = tlvp_val16_unal(&tp, RSL_IE_IPAC_REMOTE_PORT); + LOGP(DRSL, LOGL_NOTICE, "connect_port %d \n", connect_port ); + } else LOGP(DRSL, LOGL_NOTICE, "CRCX does not specify a remote port\n"); + speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE); + if (speech_mode) + LOGP(DRSL, LOGL_NOTICE, "speech mode: %d\n", *speech_mode); + else + LOGP(DRSL, LOGL_NOTICE, "speech mode: none\n"); + + payload_type = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD); + if (payload_type) + LOGP(DRSL, LOGL_NOTICE, "payload type: %d\n",*payload_type); + else + LOGP(DRSL, LOGL_NOTICE, "payload type: none\n"); + + payload_type2 = TLVP_VAL(&tp, RSL_IE_IPAC_RTP_PAYLOAD2); + if (dch->c.msg_type == RSL_MT_IPAC_CRCX && connect_ip && connect_port) inc_ip_port = 1; |