libnm-core, libnm, settings: move NMSecretAgentError to nm-errors

System Internals / NetworkManager - Dan Winship [gnome.org] - 22 October 2014 07:29 UTC

Move the definition of NMSecretAgentError to nm-errors, register it with D-Bus, and verify in the tests that it maps correctly.

NM_SECRET_AGENT_ERROR_INTERNAL_ERROR is renamed to NM_SECRET_AGENT_ERROR_FAILED, and NM_SECRET_AGENT_ERROR_NOT_AUTHORIZED to NM_SECRET_AGENT_ERROR_PERMISSION_DENIED, for consistency with other error domains. While NMSecretAgentError, unlike most other error domains, has always been correctly mapped across D-Bus, the renaming is not an ABI break, because the daemon never checks for either of those values, so all versions of the daemon will treat "org.freedesktop.NetworkManager.SecretAgent.InternalError" and "org.freedesktop.NetworkManager.SecretAgent.Failed" the same (by just ignoring the error name and keeping only the error message).

8212580 libnm-core, libnm, settings: move NMSecretAgentError to nm-errors
clients/tui/nmt-secret-agent.c | 2 +-
libnm-core/nm-errors.c | 4 ++++
libnm-core/nm-errors.h | 34 ++++++++++++++++++++++++++++++++++
libnm/nm-secret-agent.c | 34 ++++++++--------------------------
libnm/nm-secret-agent.h | 30 ------------------------------
libnm/tests/test-secret-agent.c | 4 ++--
6 files changed, 49 insertions(+), 59 deletions(-)

Upstream: cgit.freedesktop.org


  • Share