summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-12 16:29:46 +0100
committerThomas Haller <thaller@redhat.com>2016-02-16 14:13:25 +0100
commit3f00899bdedaee8fcd0168a267785565de20e794 (patch)
tree1e82c52934f7c67236da08d13828f11ede822ea0
parentdc97a3b39b75228c9b436d416167db30bc48163a (diff)
downloadNetworkManager-3f00899bdedaee8fcd0168a267785565de20e794.tar.gz
platform: continue reading in event_handler_recvmsgs() when not handling events
If @handle_events is FALSE, we want to drain the socket. In that case even when encountering an error error we don't want to abort, but instead continue reading the next message.
-rw-r--r--src/platform/nm-linux-platform.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c
index 76ca16f306..0723bf3099 100644
--- a/src/platform/nm-linux-platform.c
+++ b/src/platform/nm-linux-platform.c
@@ -5698,8 +5698,11 @@ continue_reading:
event_seq_check (platform, msg, seq_result);
- if (abort_parsing)
+ if (abort_parsing) {
+ if (!handle_events)
+ goto continue_reading;
goto out;
+ }
err = 0;
hdr = nlmsg_next (hdr, &n);