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

Skip to content
Commit 32a9bfec authored by Bart Van Assche's avatar Bart Van Assche
Browse files

libhealthloop: Modify receive buffer overflow handling



Let epoll_wait() wake up healthd if a receive buffer overflow has
happened. If a receive buffer overflow happened, this indicates that one
or more power supply uevent messages have been discarded. Handle this by
updating the battery statistics. This is the approach recommended in the
netlink(7) man page. From that manual page: "However, reliable
transmissions from kernel to user are impossible in any case. The kernel
can't send a netlink message if the socket buffer is full: the message
will be dropped and the kernel and the user-space process will no longer
have the same view of kernel state.  It is up to the application to
detect when this happens (via the ENOBUFS error returned by recvmsg(2))
and resynchronize."

Bug: 362986353
Change-Id: I0c89907eaa014f9e2859a73b29239e82f066f03f
Signed-off-by: default avatarBart Van Assche <bvanassche@google.com>
parent 7b7948b1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment