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

Commit f3a12447 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "libbinder: Return error instead of crashing on closed Trusty connection" into main

parents 13c29183 5a8c69f8
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -151,8 +151,10 @@ int RpcServerTrusty::handleMessage(const tipc_port* /*port*/, handle_t /*chan*/,


int RpcServerTrusty::handleMessageInternal(void* ctx) {
int RpcServerTrusty::handleMessageInternal(void* ctx) {
    auto* channelContext = reinterpret_cast<ChannelContext*>(ctx);
    auto* channelContext = reinterpret_cast<ChannelContext*>(ctx);
    LOG_ALWAYS_FATAL_IF(channelContext == nullptr,
    if (channelContext == nullptr) {
                        "bad state: message received on uninitialized channel");
        LOG_RPC_DETAIL("bad state: message received on uninitialized channel");
        return ERR_BAD_STATE;
    }


    auto& session = channelContext->session;
    auto& session = channelContext->session;
    auto& connection = channelContext->connection;
    auto& connection = channelContext->connection;