mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-03 08:10:17 +01:00
libnm: don't check if the agent is still registered when unregistering
The name_owner_chagned() unregisters the agent if NetworkManager goes away and nmc_cleanup() also tries to unregister an agent, resulting in an assertion failure: # nmcli c up conn666 <daemon terminates> Error: Connection activation failed: Message recipient disconnected from message bus without replying (process:8746): libnm-CRITICAL **: nm_secret_agent_old_unregister: assertion 'priv->registered == TRUE' failed _internal_unregister() already contains a priv->registered check and raising an error on duplicate unregister attempt from a daemon after a restart is not a problem either, since nmc_cleanup() doesn't care about the error returned on teardown anyway.
This commit is contained in:
parent
31669329bb
commit
0684632936
1 changed files with 0 additions and 8 deletions
|
|
@ -746,9 +746,6 @@ nm_secret_agent_old_register_finish (NMSecretAgentOld *self,
|
|||
* indicating to NetworkManager that the agent will no longer provide or
|
||||
* store secrets on behalf of this user.
|
||||
*
|
||||
* It is a programmer error to attempt to unregister an agent that is not
|
||||
* registered.
|
||||
*
|
||||
* Returns: %TRUE if unregistration was successful, %FALSE on error
|
||||
**/
|
||||
gboolean
|
||||
|
|
@ -763,7 +760,6 @@ nm_secret_agent_old_unregister (NMSecretAgentOld *self,
|
|||
|
||||
priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (self);
|
||||
|
||||
g_return_val_if_fail (priv->registered == TRUE, FALSE);
|
||||
g_return_val_if_fail (priv->bus != NULL, FALSE);
|
||||
g_return_val_if_fail (priv->manager_proxy != NULL, FALSE);
|
||||
|
||||
|
|
@ -811,9 +807,6 @@ unregister_cb (GObject *proxy, GAsyncResult *result, gpointer user_data)
|
|||
* Asynchronously unregisters the #NMSecretAgentOld with the NetworkManager secret
|
||||
* manager, indicating to NetworkManager that the agent will no longer provide
|
||||
* or store secrets on behalf of this user.
|
||||
*
|
||||
* It is a programmer error to attempt to unregister an agent that is not
|
||||
* registered.
|
||||
**/
|
||||
void
|
||||
nm_secret_agent_old_unregister_async (NMSecretAgentOld *self,
|
||||
|
|
@ -829,7 +822,6 @@ nm_secret_agent_old_unregister_async (NMSecretAgentOld *self,
|
|||
|
||||
priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (self);
|
||||
|
||||
g_return_if_fail (priv->registered == TRUE);
|
||||
g_return_if_fail (priv->bus != NULL);
|
||||
g_return_if_fail (priv->manager_proxy != NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue