Call read on any event, not just on POLLIN.

The main clatd event loop calls poll() in a loop, but reads only
from FDs that have POLLIN set. This causes it to get into an
infinite loop if one of the fds has POLLERR set.

Instead, read from all fds that have reported events. The read
causes the kernel to return the error to userspace and clear the
socket error flag, and poll starts working correctly after that.

Bug: 17183471
Bug: 17186694
Change-Id: Ie25853e0d60c077d2478b3e5154946e201f96dca
2 files changed