mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 08:18:03 +02:00
manager: disconnect NMSetting's startup-complete notification in check_if_startup_complete()
This doesn't really matter, because NMSetting's startup-complete never switches back to FALSE once reached. Still, cleanup our signal handlers when no longer needed. And disconnect the signals before emitting "notify::startup".
This commit is contained in:
parent
59dc6298c0
commit
0d1c8bc9eb
1 changed files with 12 additions and 5 deletions
|
|
@ -86,6 +86,10 @@ static void device_sleep_cb (NMDevice *device,
|
||||||
GParamSpec *pspec,
|
GParamSpec *pspec,
|
||||||
NMManager *self);
|
NMManager *self);
|
||||||
|
|
||||||
|
static void settings_startup_complete_changed (NMSettings *settings,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
NMManager *self);
|
||||||
|
|
||||||
static NM_CACHED_QUARK_FCN ("active-connection-add-and-activate", active_connection_add_and_activate_quark)
|
static NM_CACHED_QUARK_FCN ("active-connection-add-and-activate", active_connection_add_and_activate_quark)
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
@ -940,15 +944,18 @@ check_if_startup_complete (NMManager *self)
|
||||||
_LOGI (LOGD_CORE, "startup complete");
|
_LOGI (LOGD_CORE, "startup complete");
|
||||||
|
|
||||||
priv->startup = FALSE;
|
priv->startup = FALSE;
|
||||||
_notify (self, PROP_STARTUP);
|
|
||||||
|
|
||||||
/* We don't have to watch notify::has-pending-action any more. */
|
/* we no longer care about these signals. Startup-complete only
|
||||||
|
* happens once. */
|
||||||
|
g_signal_handlers_disconnect_by_func (priv->settings, G_CALLBACK (settings_startup_complete_changed), self);
|
||||||
for (iter = priv->devices; iter; iter = iter->next) {
|
for (iter = priv->devices; iter; iter = iter->next) {
|
||||||
NMDevice *dev = iter->data;
|
g_signal_handlers_disconnect_by_func (iter->data,
|
||||||
|
G_CALLBACK (device_has_pending_action_changed),
|
||||||
g_signal_handlers_disconnect_by_func (dev, G_CALLBACK (device_has_pending_action_changed), self);
|
self);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_notify (self, PROP_STARTUP);
|
||||||
|
|
||||||
if (nm_config_get_configure_and_quit (priv->config))
|
if (nm_config_get_configure_and_quit (priv->config))
|
||||||
g_signal_emit (self, signals[CONFIGURE_QUIT], 0);
|
g_signal_emit (self, signals[CONFIGURE_QUIT], 0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue