From 2bfd27f74d869a529a14e478019399075ca37d03 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 12 Feb 2025 20:58:27 +0100 Subject: [PATCH] dnsconfd: set the state to idle when connection fails If the plugin can't connect to D-Bus, it is not waiting for an update; set the state to idle. --- src/core/dns/nm-dns-dnsconfd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/dns/nm-dns-dnsconfd.c b/src/core/dns/nm-dns-dnsconfd.c index 38b7558a12..b4c935db62 100644 --- a/src/core/dns/nm-dns-dnsconfd.c +++ b/src/core/dns/nm-dns-dnsconfd.c @@ -700,7 +700,10 @@ update(NMDnsPlugin *plugin, /* We need to consider only whether we are connected, because newer update call * overrides the old one */ - if (all_connected != CONNECTION_SUCCESS) { + if (all_connected == CONNECTION_FAIL) { + priv->plugin_state = DNSCONFD_PLUGIN_IDLE; + _LOGT("failed to connect"); + } else if (all_connected == CONNECTION_WAIT) { priv->plugin_state = DNSCONFD_PLUGIN_WAIT_CONNECT; _LOGT("not connected, waiting to connect"); } else {