mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-07-09 04:05:56 +00:00
libnm: ensure auto-registration only when not yet registered
Calling nm_secret_agent_register() on an already registered instance leads to a warning. Ensure to call register during auto-registration only when needed. https://bugzilla.gnome.org/show_bug.cgi?id=727923 Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
509ac4cae7
commit
86ffea8004
|
@ -702,7 +702,8 @@ auto_register_cb (gpointer user_data)
|
|||
NMSecretAgentPrivate *priv = NM_SECRET_AGENT_GET_PRIVATE (self);
|
||||
|
||||
priv->auto_register_id = 0;
|
||||
if (priv->auto_register && !priv->suppress_auto && (priv->reg_call == NULL))
|
||||
if (priv->auto_register && !priv->suppress_auto &&
|
||||
(priv->reg_call == NULL && !priv->registered))
|
||||
nm_secret_agent_register (self);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -703,7 +703,8 @@ auto_register_cb (gpointer user_data)
|
|||
NMSecretAgentPrivate *priv = NM_SECRET_AGENT_GET_PRIVATE (self);
|
||||
|
||||
priv->auto_register_id = 0;
|
||||
if (priv->auto_register && !priv->suppress_auto && (priv->reg_call == NULL))
|
||||
if (priv->auto_register && !priv->suppress_auto &&
|
||||
(priv->reg_call == NULL && !priv->registered))
|
||||
nm_secret_agent_register (self);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user