summaryrefslogtreecommitdiff
path: root/libs/binder/RpcServer.cpp
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2023-10-16 22:01:04 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2023-10-16 22:01:04 +0000
commit3f4c4957a69f60df33fffb56a07edcfe523a13d4 (patch)
treec7d5914dadfd6766bfbd62ac96c2d32ef344fa3d /libs/binder/RpcServer.cpp
parented27e9e9f51301f27e38eca9504bc4d4de6d8838 (diff)
parent0d9dec207e5c9b208ff841a4f73a91046c92ed25 (diff)
Merge "Binder: Split OS to Android and Unix part, abstract GetThreadId out" into main
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r--libs/binder/RpcServer.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp
index 9622313699..db31737aef 100644
--- a/libs/binder/RpcServer.cpp
+++ b/libs/binder/RpcServer.cpp
@@ -56,7 +56,7 @@ RpcServer::~RpcServer() {
sp<RpcServer> RpcServer::make(std::unique_ptr<RpcTransportCtxFactory> rpcTransportCtxFactory) {
// Default is without TLS.
if (rpcTransportCtxFactory == nullptr)
- rpcTransportCtxFactory = makeDefaultRpcTransportCtxFactory();
+ rpcTransportCtxFactory = binder::os::makeDefaultRpcTransportCtxFactory();
auto ctx = rpcTransportCtxFactory->newServerCtx();
if (ctx == nullptr) return nullptr;
return sp<RpcServer>::make(std::move(ctx));
@@ -215,7 +215,7 @@ status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTranspor
iovec iov{&zero, sizeof(zero)};
std::vector<std::variant<base::unique_fd, base::borrowed_fd>> fds;
- ssize_t num_bytes = receiveMessageFromSocket(server.mServer, &iov, 1, &fds);
+ ssize_t num_bytes = binder::os::receiveMessageFromSocket(server.mServer, &iov, 1, &fds);
if (num_bytes < 0) {
int savedErrno = errno;
ALOGE("Failed recvmsg: %s", strerror(savedErrno));
@@ -230,7 +230,7 @@ status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTranspor
}
unique_fd fd(std::move(std::get<unique_fd>(fds.back())));
- if (auto res = setNonBlocking(fd); !res.ok()) {
+ if (auto res = binder::os::setNonBlocking(fd); !res.ok()) {
ALOGE("Failed setNonBlocking: %s", res.error().message().c_str());
return res.error().code() == 0 ? UNKNOWN_ERROR : -res.error().code();
}
@@ -487,7 +487,7 @@ void RpcServer::establishConnection(
return;
}
- auto status = getRandomBytes(sessionId.data(), sessionId.size());
+ auto status = binder::os::getRandomBytes(sessionId.data(), sessionId.size());
if (status != OK) {
ALOGE("Failed to read random session ID: %s", strerror(-status));
return;