mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 16:00:12 +01:00
dnsconfd: fix handling of the update-pending flag
After every state change of the plugin there should be an invocation
of _nm_dns_plugin_update_pending_maybe_changed() to re-evaluate
whether we are waiting for an update. send_dnsconfd_update() doesn't
change the state and so there is need to check again afterwards.
(cherry picked from commit 8ff1cbf38b)
This commit is contained in:
parent
5749633729
commit
dc0ff10efb
1 changed files with 7 additions and 3 deletions
|
|
@ -61,7 +61,11 @@ G_DEFINE_TYPE(NMDnsDnsconfd, nm_dns_dnsconfd, NM_TYPE_DNS_PLUGIN)
|
|||
|
||||
#define DNSCONFD_DBUS_SERVICE "com.redhat.dnsconfd"
|
||||
|
||||
typedef enum { CONNECTION_FAIL, CONNECTION_SUCCESS, CONNECTION_WAIT } ConnectionState;
|
||||
typedef enum {
|
||||
CONNECTION_FAIL,
|
||||
CONNECTION_SUCCESS,
|
||||
CONNECTION_WAIT,
|
||||
} ConnectionState;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
|
@ -704,6 +708,8 @@ update(NMDnsPlugin *plugin,
|
|||
_LOGT("connected, waiting for update to finish");
|
||||
}
|
||||
|
||||
_nm_dns_plugin_update_pending_maybe_changed(plugin);
|
||||
|
||||
if (all_connected == CONNECTION_FAIL) {
|
||||
nm_utils_error_set(error,
|
||||
NM_UTILS_ERROR_UNKNOWN,
|
||||
|
|
@ -717,8 +723,6 @@ update(NMDnsPlugin *plugin,
|
|||
|
||||
send_dnsconfd_update(self);
|
||||
|
||||
_nm_dns_plugin_update_pending_maybe_changed(NM_DNS_PLUGIN(self));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue