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.
* indicating to NetworkManager that the agent will no longer provide or
* store secrets on behalf of this user.
*
* 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
* Returns: %TRUE if unregistration was successful, %FALSE on error
**/
gboolean
priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (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);
g_return_val_if_fail (priv->bus != NULL, FALSE);
g_return_val_if_fail (priv->manager_proxy != NULL, FALSE);
* 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.
* 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,
**/
void
nm_secret_agent_old_unregister_async (NMSecretAgentOld *self,
priv = NM_SECRET_AGENT_OLD_GET_PRIVATE (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);
g_return_if_fail (priv->bus != NULL);
g_return_if_fail (priv->manager_proxy != NULL);