summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2015-10-07 15:19:21 +0200
committerLubomir Rintel <lkundrak@v3.sk>2015-10-07 15:54:45 +0200
commit3abe1bb21a58bd943d065ce95886980e081ae48c (patch)
treed22d756edc19ba61a69c06fc0b7ca7ccfeb771f4
parent76726b99221a1f9cc86061e75843b136a119f32e (diff)
downloadNetworkManager-3abe1bb21a58bd943d065ce95886980e081ae48c.tar.gz
device: don't complain about repeated schedules of the same activation stage
Can easily happend with a storm of DHCP responses or RAs before the idle handler has a chance to run. https://bugzilla.redhat.com/show_bug.cgi?id=1269520
-rw-r--r--src/devices/nm-device.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c
index 0bede2c3d3..cac9094930 100644
--- a/src/devices/nm-device.c
+++ b/src/devices/nm-device.c
@@ -2814,19 +2814,23 @@ activation_source_schedule (NMDevice *self, GSourceFunc func, int family)
act_source_func = &priv->act_source_func;
}
- if (*act_source_id)
- _LOGE (LOGD_DEVICE, "activation stage already scheduled");
-
- /* Don't bother rescheduling the same function that's about to
- * run anyway. Fixes issues with crappy wireless drivers sending
- * streams of associate events before NM has had a chance to process
- * the first one.
- */
- if (!*act_source_id || (*act_source_func != func)) {
- activation_source_clear (self, TRUE, family);
- *act_source_id = g_idle_add (func, self);
- *act_source_func = func;
+ if (*act_source_id) {
+ if (*act_source_func == func) {
+ /* Don't bother rescheduling the same function that's about to
+ * run anyway. Fixes issues with crappy wireless drivers sending
+ * streams of associate events before NM has had a chance to process
+ * the first one.
+ */
+ _LOGD (LOGD_DEVICE, "activation stage already scheduled");
+ return;
+ } else {
+ _LOGW (LOGD_DEVICE, "a different activation stage already scheduled");
+ activation_source_clear (self, TRUE, family);
+ }
}
+
+ *act_source_id = g_idle_add (func, self);
+ *act_source_func = func;
}
static gboolean