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

Commit 11d223ba authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

Add the name of channel receiving bad data

When the InputReceiver gets bad data from the other end of the channel, we currently don't print the channel information. As a result, when this crash happens, we only learn about the process name. Add the channel info to this crash so that it's more useful going forward.

Bug: 329059530
Change-Id: Iad4c892dee37a9bf35e790781a2c39431d5a146a
Test: presubmit
parent 232f2712
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -325,9 +325,10 @@ status_t InputConsumer::consume(InputEventFactoryInterface* factory, bool consum

            case InputMessage::Type::FINISHED:
            case InputMessage::Type::TIMELINE: {
                LOG_ALWAYS_FATAL("Consumed a %s message, which should never be seen by "
                                 "InputConsumer!",
                                 ftl::enum_string(mMsg.header.type).c_str());
                LOG(FATAL) << "Consumed a " << ftl::enum_string(mMsg.header.type)
                           << " message, which should never be seen by "
                              "InputConsumer on "
                           << mChannel->getName();
                break;
            }

+3 −4
Original line number Diff line number Diff line
@@ -413,10 +413,9 @@ void InputConsumerNoResampling::handleMessage(const InputMessage& msg) const {

        case InputMessage::Type::FINISHED:
        case InputMessage::Type::TIMELINE: {
            LOG_ALWAYS_FATAL("Consumed a %s message, which should never be seen by "
                             "InputConsumer on %s",
                             ftl::enum_string(msg.header.type).c_str(),
                             mChannel->getName().c_str());
            LOG(FATAL) << "Consumed a " << ftl::enum_string(msg.header.type)
                       << " message, which should never be seen by InputConsumer on "
                       << mChannel->getName();
            break;
        }