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.
This commit is contained in:
Beniamino Galvani 2025-02-12 20:58:27 +01:00
parent 8ff1cbf38b
commit 2bfd27f74d

View file

@ -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 {