diff options
Diffstat (limited to 'libs/binder/RpcServer.cpp')
-rw-r--r-- | libs/binder/RpcServer.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index de7160ee08..786e2db3b3 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -149,38 +149,38 @@ void RpcServer::join() { { std::lock_guard<std::mutex> _l(mLock); - sp<RpcConnection> connection; - if (id == RPC_CONNECTION_ID_NEW) { + sp<RpcSession> session; + if (id == RPC_SESSION_ID_NEW) { // new client! - LOG_ALWAYS_FATAL_IF(mConnectionIdCounter >= INT32_MAX, "Out of connection IDs"); - mConnectionIdCounter++; + LOG_ALWAYS_FATAL_IF(mSessionIdCounter >= INT32_MAX, "Out of session IDs"); + mSessionIdCounter++; - connection = RpcConnection::make(); - connection->setForServer(wp<RpcServer>::fromExisting(this), mConnectionIdCounter); + session = RpcSession::make(); + session->setForServer(wp<RpcServer>::fromExisting(this), mSessionIdCounter); - mConnections[mConnectionIdCounter] = connection; + mSessions[mSessionIdCounter] = session; } else { - auto it = mConnections.find(id); - if (it == mConnections.end()) { - ALOGE("Cannot add thread, no record of connection with ID %d", id); + auto it = mSessions.find(id); + if (it == mSessions.end()) { + ALOGE("Cannot add thread, no record of session with ID %d", id); continue; } - connection = it->second; + session = it->second; } - connection->startThread(std::move(clientFd)); + session->startThread(std::move(clientFd)); } } } -std::vector<sp<RpcConnection>> RpcServer::listConnections() { +std::vector<sp<RpcSession>> RpcServer::listSessions() { std::lock_guard<std::mutex> _l(mLock); - std::vector<sp<RpcConnection>> connections; - for (auto& [id, connection] : mConnections) { + std::vector<sp<RpcSession>> sessions; + for (auto& [id, session] : mSessions) { (void)id; - connections.push_back(connection); + sessions.push_back(session); } - return connections; + return sessions; } bool RpcServer::setupSocketServer(const RpcSocketAddress& addr) { |