Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c58ebd7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "libbinder: addClient->addClientConnection" am: 7e563f09

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1704012

Change-Id: I7e0b68c48cbbcf12958d2d6855076d26e2e9dfa5
parents 4cc54d4c 7e563f09
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ bool RpcSession::addNullDebuggingClient() {
        return false;
    }

    addClient(std::move(serverFd));
    addClientConnection(std::move(serverFd));
    return true;
}

@@ -255,7 +255,7 @@ bool RpcSession::setupOneSocketClient(const RpcSocketAddress& addr, int32_t id)

        LOG_RPC_DETAIL("Socket at %s client with fd %d", addr.toString().c_str(), serverFd.get());

        addClient(std::move(serverFd));
        addClientConnection(std::move(serverFd));
        return true;
    }

@@ -263,7 +263,7 @@ bool RpcSession::setupOneSocketClient(const RpcSocketAddress& addr, int32_t id)
    return false;
}

void RpcSession::addClient(unique_fd fd) {
void RpcSession::addClientConnection(unique_fd fd) {
    std::lock_guard<std::mutex> _l(mMutex);
    sp<RpcConnection> session = sp<RpcConnection>::make();
    session->fd = std::move(fd);
+1 −1
Original line number Diff line number Diff line
@@ -128,7 +128,7 @@ private:

    bool setupSocketClient(const RpcSocketAddress& address);
    bool setupOneSocketClient(const RpcSocketAddress& address, int32_t sessionId);
    void addClient(base::unique_fd fd);
    void addClientConnection(base::unique_fd fd);
    void setForServer(const wp<RpcServer>& server, int32_t sessionId);
    sp<RpcConnection> assignServerToThisThread(base::unique_fd fd);
    bool removeServerConnection(const sp<RpcConnection>& connection);