From 5084c83901d6e5e4214512211b5e86d5c63926bd Mon Sep 17 00:00:00 2001 From: Hugo Santos Date: Fri, 27 Apr 2007 07:20:43 +0000 Subject: [PATCH] addressed Axel's suggestion regarding SocketAddress' GetPort() name. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20851 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/private/net/AddressUtilities.h | 4 ++-- .../kernel/network/protocols/tcp/EndpointManager.cpp | 8 ++++---- src/add-ons/kernel/network/protocols/udp/udp.cpp | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/headers/private/net/AddressUtilities.h b/headers/private/net/AddressUtilities.h index 50d052d492..3af09a37fd 100644 --- a/headers/private/net/AddressUtilities.h +++ b/headers/private/net/AddressUtilities.h @@ -62,7 +62,7 @@ public: return fModule->equal_masked_addresses(fAddress, address, mask); } - uint16 GetPort() const + uint16 Port() const { return fModule->get_port(fAddress); } @@ -161,7 +161,7 @@ public: return fModule->equal_masked_addresses(fAddress, address, mask); } - uint16 GetPort() const + uint16 Port() const { return fModule->get_port(fAddress); } diff --git a/src/add-ons/kernel/network/protocols/tcp/EndpointManager.cpp b/src/add-ons/kernel/network/protocols/tcp/EndpointManager.cpp index f58b14733a..b5ade2c051 100644 --- a/src/add-ons/kernel/network/protocols/tcp/EndpointManager.cpp +++ b/src/add-ons/kernel/network/protocols/tcp/EndpointManager.cpp @@ -73,14 +73,14 @@ EndpointHashDefinition::HashKey(uint16 port) const size_t EndpointHashDefinition::Hash(TCPEndpoint *endpoint) const { - return endpoint->LocalAddress().GetPort(); + return endpoint->LocalAddress().Port(); } bool EndpointHashDefinition::Compare(uint16 port, TCPEndpoint *endpoint) const { - return endpoint->LocalAddress().GetPort() == port; + return endpoint->LocalAddress().Port() == port; } @@ -146,7 +146,7 @@ EndpointManager::SetConnection(TCPEndpoint *endpoint, local.SetTo(_local); if (local.IsEmpty(false)) { - uint16 port = local.GetPort(); + uint16 port = local.Port(); local.SetTo(interfaceLocal); local.SetPort(port); } @@ -372,7 +372,7 @@ EndpointManager::Unbind(TCPEndpoint *endpoint) BenaphoreLocker _(fLock); TCPEndpoint *other = - fEndpointHash.Lookup(endpoint->LocalAddress().GetPort()); + fEndpointHash.Lookup(endpoint->LocalAddress().Port()); if (other != endpoint) { // remove endpoint from the list of endpoints with the same port while (other != NULL && other->fEndpointNextWithSamePort != endpoint) diff --git a/src/add-ons/kernel/network/protocols/udp/udp.cpp b/src/add-ons/kernel/network/protocols/udp/udp.cpp index 23d538ce78..12209649bd 100644 --- a/src/add-ons/kernel/network/protocols/udp/udp.cpp +++ b/src/add-ons/kernel/network/protocols/udp/udp.cpp @@ -254,7 +254,7 @@ UdpDomainSupport::CheckBindRequest(sockaddr *address, int socketOptions) break; TRACE_DOMAIN(" ...checking endpoint %p (port=%u)...", otherEndpoint, - ntohs(otherEndpoint->LocalAddress().GetPort())); + ntohs(otherEndpoint->LocalAddress().Port())); if (otherEndpoint->LocalAddress().EqualPorts(address)) { // port is already bound, SO_REUSEADDR or SO_REUSEPORT is required: @@ -340,7 +340,7 @@ UdpDomainSupport::_DemuxBroadcast(net_buffer *buffer) TRACE_DOMAIN(" _DemuxBroadcast(): checking endpoint %s...", AddressString(fDomain, *endpoint->LocalAddress(), true).Data()); - if (endpoint->LocalAddress().GetPort() != incomingPort) { + if (endpoint->LocalAddress().Port() != incomingPort) { // ports don't match, so we do not dispatch to this endpoint... continue; } @@ -441,7 +441,7 @@ UdpDomainSupport::_GetNextEphemeral() break; } - endpointPort = endpoint->LocalAddress().GetPort(); + endpointPort = endpoint->LocalAddress().Port(); TRACE_DOMAIN(" _GetNextEphemeral(): checking endpoint %p (port %hu)...", endpoint, ntohs(endpointPort));