platform: fix event_handler_read_netlink_one() wrongly returning with nothing to read

When the errno was accidentally set to EAGAIN or EWOULDBLOCK,
we would only read one single message and return that there is
nothing to read.

This means, if there were more then one messages ready to read,
we would only read the first one and return to the main-loop
(which then again calls back to platform as more data is ready
to be read).
This commit is contained in:
Thomas Haller
2015-12-10 15:50:00 +01:00
parent 1057e30dc8
commit 10b684b827

View File

@@ -5449,6 +5449,7 @@ event_handler_read_netlink_one (NMPlatform *platform)
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform); NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
int nle; int nle;
errno = 0;
nle = nl_recvmsgs_default (priv->nlh_event); nle = nl_recvmsgs_default (priv->nlh_event);
/* Work around a libnl bug fixed in 3.2.22 (375a6294) */ /* Work around a libnl bug fixed in 3.2.22 (375a6294) */