[MERGED] osmo-bts[master]: rsl: improving the log output

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Oct 12 10:17:44 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: rsl: improving the log output
......................................................................


rsl: improving the log output

to show more details about the payload type and the connection

Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd
---
M src/common/rsl.c
1 file changed, 20 insertions(+), 7 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/common/rsl.c b/src/common/rsl.c
index 0f16f7d..d2fea12 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1584,21 +1584,34 @@
 		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;
 

-- 
To view, visit https://gerrit.osmocom.org/902
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd
Gerrit-PatchSet: 7
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list