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

Commit 19894a56 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "RPC Binder: Shut down the session on disconnect" am: af3a7d09 am:...

Merge "RPC Binder: Shut down the session on disconnect" am: af3a7d09 am: abf1161a am: ed7db343 am: 9d46942d am: 3caa856c

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



Change-Id: Ie3e1db2f0d5dd56cc6aa4cf7723454f7e99a4d33
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 105ce928 3caa856c
Loading
Loading
Loading
Loading
+12 −2
Original line number Original line Diff line number Diff line
@@ -154,8 +154,18 @@ int RpcServerTrusty::handleMessage(const tipc_port* /*port*/, handle_t /*chan*/,
    return NO_ERROR;
    return NO_ERROR;
}
}


void RpcServerTrusty::handleDisconnect(const tipc_port* /*port*/, handle_t /*chan*/,
void RpcServerTrusty::handleDisconnect(const tipc_port* /*port*/, handle_t /*chan*/, void* ctx) {
                                       void* /*ctx*/) {}
    auto* channelContext = reinterpret_cast<ChannelContext*>(ctx);
    if (channelContext == nullptr) {
        // Connections marked "incoming" (outgoing from the server's side)
        // do not have a valid channel context because joinFn does not get
        // called for them. We ignore them here.
        return;
    }

    auto& session = channelContext->session;
    (void)session->shutdownAndWait(false);
}


void RpcServerTrusty::handleChannelCleanup(void* ctx) {
void RpcServerTrusty::handleChannelCleanup(void* ctx) {
    auto* channelContext = reinterpret_cast<ChannelContext*>(ctx);
    auto* channelContext = reinterpret_cast<ChannelContext*>(ctx);