Change in osmo-pcu[master]: pcu_l1_if: use network byte order for all ports

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/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Fri Oct 9 00:08:52 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/20498 )


Change subject: pcu_l1_if: use network byte order for all ports
......................................................................

pcu_l1_if: use network byte order for all ports

Having all connection information in network byte order
make it more consistent to me.
Change-Id: I675cc2564eab5125e08291e44b6cb66082f694b9

Change-Id: Ia3829c8275520d1c6e694c16459658c5dc4714d7
---
M src/pcu_l1_if.cpp
1 file changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/98/20498/1

diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index b2a44d7..fb9cd12 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -586,20 +586,20 @@
 		case PCU_IF_ADDR_TYPE_IPV4:
 			local_sockaddr.u.sin.sin_family = AF_INET;
 			local_sockaddr.u.sin.sin_addr.s_addr = INADDR_ANY;
-			local_sockaddr.u.sin.sin_port = htons(info_ind->local_port[i]);
+			local_sockaddr.u.sin.sin_port = info_ind->local_port[i];
 
 			remote_sockaddr.u.sin.sin_family = AF_INET;
 			remote_sockaddr.u.sin.sin_addr = info_ind->remote_ip[i].v4;
-			remote_sockaddr.u.sin.sin_port = htons(info_ind->remote_port[i]);
+			remote_sockaddr.u.sin.sin_port = info_ind->remote_port[i];
 			break;
 		case PCU_IF_ADDR_TYPE_IPV6:
 			local_sockaddr.u.sin6.sin6_family = AF_INET6;
 			local_sockaddr.u.sin6.sin6_addr = in6addr_any;
-			local_sockaddr.u.sin6.sin6_port = htons(info_ind->local_port[i]);
+			local_sockaddr.u.sin6.sin6_port = info_ind->local_port[i];
 
 			remote_sockaddr.u.sin6.sin6_family = AF_INET6;
 			remote_sockaddr.u.sin6.sin6_addr = info_ind->remote_ip[i].v6;
-			remote_sockaddr.u.sin6.sin6_port = htons(info_ind->remote_port[i]);
+			remote_sockaddr.u.sin6.sin6_port = info_ind->remote_port[i];
 			break;
 		default:
 			continue;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/20498
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: Ia3829c8275520d1c6e694c16459658c5dc4714d7
Gerrit-Change-Number: 20498
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201009/0bd3f8ef/attachment.htm>


More information about the gerrit-log mailing list