libnm: don't check if the agent is still registered when unregistering
authorLubomir Rintel <lkundrak@v3.sk>
Tue, 29 Mar 2016 12:34:26 +0000 (14:34 +0200)
committerLubomir Rintel <lkundrak@v3.sk>
Tue, 29 Mar 2016 13:08:19 +0000 (15:08 +0200)
commit0684632936e57a2f042caef6592f87e243a319a4
tree2608ae9e87ba20f620e13a46a54bfdc0075b7f69
parent31669329bbf90edf37e5586909e2f0f3b995c5e2
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.
libnm/nm-secret-agent-old.c