diff options
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r-- | libs/binder/RpcServer.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index fefaa810d2..d9e926a9d5 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -45,7 +45,8 @@ namespace android { constexpr size_t kSessionIdBytes = 32; using namespace android::binder::impl; -using base::unique_fd; +using android::binder::borrowed_fd; +using android::binder::unique_fd; RpcServer::RpcServer(std::unique_ptr<RpcTransportCtx> ctx) : mCtx(std::move(ctx)) {} RpcServer::~RpcServer() { @@ -166,7 +167,7 @@ void RpcServer::setConnectionFilter(std::function<bool(const void*, size_t)>&& f mConnectionFilter = std::move(filter); } -void RpcServer::setServerSocketModifier(std::function<void(base::borrowed_fd)>&& modifier) { +void RpcServer::setServerSocketModifier(std::function<void(borrowed_fd)>&& modifier) { RpcMutexLockGuard _l(mLock); LOG_ALWAYS_FATAL_IF(mServer.fd.ok(), "Already started"); mServerSocketModifier = std::move(modifier); @@ -213,7 +214,7 @@ status_t RpcServer::acceptSocketConnection(const RpcServer& server, RpcTransport status_t RpcServer::recvmsgSocketConnection(const RpcServer& server, RpcTransportFd* out) { int zero = 0; iovec iov{&zero, sizeof(zero)}; - std::vector<std::variant<base::unique_fd, base::borrowed_fd>> fds; + std::vector<std::variant<unique_fd, borrowed_fd>> fds; ssize_t num_bytes = binder::os::receiveMessageFromSocket(server.mServer, &iov, 1, &fds); if (num_bytes < 0) { @@ -644,8 +645,7 @@ unique_fd RpcServer::releaseServer() { } status_t RpcServer::setupExternalServer( - base::unique_fd serverFd, - std::function<status_t(const RpcServer&, RpcTransportFd*)>&& acceptFn) { + unique_fd serverFd, std::function<status_t(const RpcServer&, RpcTransportFd*)>&& acceptFn) { RpcMutexLockGuard _l(mLock); if (mServer.fd.ok()) { ALOGE("Each RpcServer can only have one server."); @@ -656,7 +656,7 @@ status_t RpcServer::setupExternalServer( return OK; } -status_t RpcServer::setupExternalServer(base::unique_fd serverFd) { +status_t RpcServer::setupExternalServer(unique_fd serverFd) { return setupExternalServer(std::move(serverFd), &RpcServer::acceptSocketConnection); } |