about summary refs log tree commit diff
path: root/src/devices/nm-acd-manager.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2019-11-06 20:46:28 +0100
committerMichael Biebl <biebl@debian.org>2019-11-06 20:46:28 +0100
commit515e1311d22086215e182f18a4529f24660ca4c3 (patch)
tree5b1d21eeceaa57d233d46ddfeeca5e0c1fc8b8a3 /src/devices/nm-acd-manager.c
parent790e3946f0274a272fdda4d8697ce31a757a48d2 (diff)
parent9c642eac191ef0dce49855d8da0a9e9af18d5113 (diff)
Update upstream source from tag 'upstream/1.20.6'
Update to upstream version '1.20.6'
with Debian dir 93035bdc0e2b22e7410d6c70c55a21648f836a2f
Diffstat (limited to 'src/devices/nm-acd-manager.c')
-rw-r--r--src/devices/nm-acd-manager.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/devices/nm-acd-manager.c b/src/devices/nm-acd-manager.c
index aca7ffd2..036c4709 100644
--- a/src/devices/nm-acd-manager.c
+++ b/src/devices/nm-acd-manager.c
@@ -344,6 +344,8 @@ nm_acd_manager_start_probe (NMAcdManager *self, guint timeout)
 	if (success)
 		self->state = STATE_PROBING;
 
+	nm_assert (!self->channel);
+	nm_assert (self->event_id == 0);
 	n_acd_get_fd (self->acd, &fd);
 	self->channel = g_io_channel_unix_new (fd);
 	self->event_id = g_io_add_watch (self->channel, G_IO_IN, acd_event, self);
@@ -389,6 +391,7 @@ nm_acd_manager_announce_addresses (NMAcdManager *self)
 	GHashTableIter iter;
 	AddressInfo *info;
 	int r;
+	int fd;
 	gboolean success = TRUE;
 
 	r = acd_init (self);
@@ -428,6 +431,13 @@ nm_acd_manager_announce_addresses (NMAcdManager *self)
 		}
 	}
 
+	if (!self->channel) {
+		nm_assert (self->event_id == 0);
+		n_acd_get_fd (self->acd, &fd);
+		self->channel = g_io_channel_unix_new (fd);
+		self->event_id = g_io_add_watch (self->channel, G_IO_IN, acd_event, self);
+	}
+
 	return success ? 0 : -NME_UNSPEC;
 }