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

Commit d98533a0 authored by Geremy Condra's avatar Geremy Condra
Browse files

Added netlink failure logging to NetlinkListener.cpp

This depends on If2f00708a1dd6196c415b1ebc2a7eeb72399a90e

Change-Id: If6c63e46f906b94f4778eb5e78123d8efe1710d4
parent 15892e10
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2,3 +2,4 @@

# FrameworkListener dispatchCommand overflow
78001 dispatchCommand_overflow
65537 netlink_failure (uid|1)
+5 −1
Original line number Diff line number Diff line
@@ -45,9 +45,13 @@ bool NetlinkListener::onDataAvailable(SocketClient *cli)
{
    int socket = cli->getSocket();
    ssize_t count;
    uid_t uid = -1;

    count = TEMP_FAILURE_RETRY(uevent_kernel_multicast_recv(socket, mBuffer, sizeof(mBuffer)));
    count = TEMP_FAILURE_RETRY(uevent_kernel_multicast_uid_recv(
                                       socket, mBuffer, sizeof(mBuffer), &uid));
    if (count < 0) {
        if (uid > 0)
            LOG_EVENT_INT(65537, uid);
        SLOGE("recvmsg failed (%s)", strerror(errno));
        return false;
    }