mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 07:10:12 +01:00
dns: explicitly stop DNS plugin in manager
_clear_plugin() should explicitly stop the DNS plugin, instead of just
unreferencing it. Unreferencing does not necessarily mean, that the
plugin will be destroyed right away.
(cherry picked from commit e1d5b27c4f)
This commit is contained in:
parent
f065794eeb
commit
cff8c257d3
3 changed files with 10 additions and 1 deletions
|
|
@ -1493,6 +1493,7 @@ _clear_plugin (NMDnsManager *self)
|
|||
if (priv->plugin) {
|
||||
g_signal_handlers_disconnect_by_func (priv->plugin, plugin_failed, self);
|
||||
g_signal_handlers_disconnect_by_func (priv->plugin, plugin_child_quit, self);
|
||||
nm_dns_plugin_stop (priv->plugin);
|
||||
g_clear_object (&priv->plugin);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -254,6 +254,12 @@ nm_dns_plugin_child_kill (NMDnsPlugin *self)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
nm_dns_plugin_stop (NMDnsPlugin *self)
|
||||
{
|
||||
nm_dns_plugin_child_kill (self);
|
||||
}
|
||||
|
||||
/********************************************/
|
||||
|
||||
static void
|
||||
|
|
@ -266,7 +272,7 @@ dispose (GObject *object)
|
|||
{
|
||||
NMDnsPlugin *self = NM_DNS_PLUGIN (object);
|
||||
|
||||
nm_dns_plugin_child_kill (self);
|
||||
nm_dns_plugin_stop (self);
|
||||
|
||||
G_OBJECT_CLASS (nm_dns_plugin_parent_class)->dispose (object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ gboolean nm_dns_plugin_update (NMDnsPlugin *self,
|
|||
const NMGlobalDnsConfig *global_config,
|
||||
const char *hostname);
|
||||
|
||||
void nm_dns_plugin_stop (NMDnsPlugin *self);
|
||||
|
||||
/* For subclasses/plugins */
|
||||
|
||||
/* Spawn a child process and watch for it to quit. 'argv' is the NULL-terminated
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue