diff options
author | 2021-07-15 22:59:34 +0000 | |
---|---|---|
committer | 2021-07-16 00:02:02 +0000 | |
commit | 1b304299ea0f35db0a2e0894665ad29fa3b54e22 (patch) | |
tree | 0b790e3156a26631a900af004eb10a59f0547df5 /libs/binder/RpcServer.cpp | |
parent | fba6f77ac6498aa35cd709ba2aa492d89df02399 (diff) |
libbinder: respect 'reverse' cncts are 'incoming'
Reverse connections are incoming. This probably should have been done as
part of the client/server disambiguation CL, but doing it now.
Bug: N/A
Test: N/A
Change-Id: Ie66e92ccb826bf13094a79bfd38bff260e9c6de6
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r-- | libs/binder/RpcServer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index eacd7bc661..d3ee6a6b8a 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -249,7 +249,7 @@ void RpcServer::establishConnection(sp<RpcServer>&& server, base::unique_fd clie statusToString(status).c_str()); // still need to cleanup before we can return } - bool reverse = header.options & RPC_CONNECTION_OPTION_REVERSE; + bool incoming = header.options & RPC_CONNECTION_OPTION_INCOMING; std::thread thisThread; sp<RpcSession> session; @@ -274,8 +274,8 @@ void RpcServer::establishConnection(sp<RpcServer>&& server, base::unique_fd clie RpcAddress sessionId = RpcAddress::fromRawEmbedded(&header.sessionId); if (sessionId.isZero()) { - if (reverse) { - ALOGE("Cannot create a new session with a reverse connection, would leak"); + if (incoming) { + ALOGE("Cannot create a new session with an incoming connection, would leak"); return; } @@ -313,7 +313,7 @@ void RpcServer::establishConnection(sp<RpcServer>&& server, base::unique_fd clie session = it->second; } - if (reverse) { + if (incoming) { LOG_ALWAYS_FATAL_IF(!session->addOutgoingConnection(std::move(clientFd), true), "server state must already be initialized"); return; |