summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2021-04-26 22:52:50 +0000
committer Steven Moreland <smoreland@google.com> 2021-04-26 22:55:47 +0000
commitd8996dfb677abe8ef9f9e0a51536f4b5753ae22e (patch)
tree12f16c56fce227a382adb85181582ebef109f0bb
parent158b63da009e7b38604962118a09a5ec5b131f22 (diff)
libbinder: SocketAddressImpl -> InetSocketAddress
For consistency with other subclasses, like VsockSocketAddress. Bug: 185167543 Test: N/A Change-Id: I292b8e3254d21221fbba60877715085dab5b3194
-rw-r--r--libs/binder/RpcConnection.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/RpcConnection.cpp b/libs/binder/RpcConnection.cpp
index 7c8d2509d3..f2302f7e56 100644
--- a/libs/binder/RpcConnection.cpp
+++ b/libs/binder/RpcConnection.cpp
@@ -130,9 +130,9 @@ bool RpcConnection::addVsockClient(unsigned int cid, unsigned int port) {
#endif // __BIONIC__
-class SocketAddressImpl : public RpcConnection::SocketAddress {
+class InetSocketAddress : public RpcConnection::SocketAddress {
public:
- SocketAddressImpl(const sockaddr* sockAddr, size_t size, const char* addr, unsigned int port)
+ InetSocketAddress(const sockaddr* sockAddr, size_t size, const char* addr, unsigned int port)
: mSockAddr(sockAddr), mSize(size), mAddr(addr), mPort(port) {}
[[nodiscard]] std::string toString() const override {
return String8::format("%s:%u", mAddr, mPort).c_str();
@@ -172,7 +172,7 @@ bool RpcConnection::setupInetServer(unsigned int port) {
auto aiStart = GetAddrInfo(kAddr, port);
if (aiStart == nullptr) return false;
for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) {
- SocketAddressImpl socketAddress(ai->ai_addr, ai->ai_addrlen, kAddr, port);
+ InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, kAddr, port);
if (setupSocketServer(socketAddress)) return true;
}
ALOGE("None of the socket address resolved for %s:%u can be set up as inet server.", kAddr,
@@ -184,7 +184,7 @@ bool RpcConnection::addInetClient(const char* addr, unsigned int port) {
auto aiStart = GetAddrInfo(addr, port);
if (aiStart == nullptr) return false;
for (auto ai = aiStart.get(); ai != nullptr; ai = ai->ai_next) {
- SocketAddressImpl socketAddress(ai->ai_addr, ai->ai_addrlen, addr, port);
+ InetSocketAddress socketAddress(ai->ai_addr, ai->ai_addrlen, addr, port);
if (addSocketClient(socketAddress)) return true;
}
ALOGE("None of the socket address resolved for %s:%u can be added as inet client.", addr, port);