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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/24837 )
Change subject: rsl: use tlvp_val16be() in rsl_rx_ipac_XXcx()
......................................................................
rsl: use tlvp_val16be() in rsl_rx_ipac_XXcx()
Instead of using tlvp_val16_unal() and then doing ntohs() here
and there, convert the remote port to the host byte order once.
Change-Id: Id883a976a03fd3022ed9d66f703b01244df2d9db
---
M src/common/rsl.c
1 file changed, 4 insertions(+), 5 deletions(-)
Approvals:
laforge: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 57a95a1..18c0349 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2625,9 +2625,8 @@
}
if (TLVP_PRES_LEN(&tp, RSL_IE_IPAC_REMOTE_PORT, 2)) {
- connect_port = tlvp_val16_unal(&tp, RSL_IE_IPAC_REMOTE_PORT);
- LOGPC(DRSL, LOGL_DEBUG, "connect_port=%u ",
- ntohs(connect_port));
+ connect_port = tlvp_val16be(&tp, RSL_IE_IPAC_REMOTE_PORT);
+ LOGPC(DRSL, LOGL_DEBUG, "connect_port=%u ", connect_port);
}
speech_mode = TLVP_VAL(&tp, RSL_IE_IPAC_SPEECH_MODE);
@@ -2743,7 +2742,7 @@
} else
ia.s_addr = connect_ip;
rc = osmo_rtp_socket_connect(lchan->abis_ip.rtp_socket,
- inet_ntoa(ia), ntohs(connect_port));
+ inet_ntoa(ia), connect_port);
if (rc < 0) {
LOGPLCHAN(lchan, DRTP, LOGL_ERROR, "Failed to connect RTP/RTCP sockets\n");
osmo_rtp_socket_free(lchan->abis_ip.rtp_socket);
@@ -2754,7 +2753,7 @@
}
/* save IP address and port number */
lchan->abis_ip.connect_ip = ntohl(ia.s_addr);
- lchan->abis_ip.connect_port = ntohs(connect_port);
+ lchan->abis_ip.connect_port = connect_port;
rc = osmo_rtp_get_bound_ip_port(lchan->abis_ip.rtp_socket,
&lchan->abis_ip.bound_ip,
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24837
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id883a976a03fd3022ed9d66f703b01244df2d9db
Gerrit-Change-Number: 24837
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210705/d8513a49/attachment.htm>