summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-08-25 10:02:03 +0200
committerThomas Haller <thaller@redhat.com>2015-08-25 16:37:43 +0200
commitcf16010fb6bef8f75471694a6469f0ccca97e256 (patch)
tree2e75355cd52b065c3bc27722f720ab4cd112d08a
parent88e485bc1d846920062921cad152bd0996b73d0d (diff)
downloadNetworkManager-cf16010fb6bef8f75471694a6469f0ccca97e256.tar.gz
agent-manager: fix checking for D-Bus error after gdbus switch
With gdbus, errors are now properly translated. We must check for the error domain/code, intead of the dbus-error. Fixes: df6706813a698e7a697739b0940bd8f528713aab
-rw-r--r--src/settings/nm-agent-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings/nm-agent-manager.c b/src/settings/nm-agent-manager.c
index d9dc1daf9c..1d202b49eb 100644
--- a/src/settings/nm-agent-manager.c
+++ b/src/settings/nm-agent-manager.c
@@ -791,7 +791,7 @@ get_done_cb (NMSecretAgent *agent,
error ? error->code : -1,
(error && error->message) ? error->message : "(unknown)");
- if (_nm_dbus_error_has_name (error, NM_DBUS_INTERFACE_SECRET_AGENT ".UserCanceled")) {
+ if (g_error_matches (error, NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_USER_CANCELED)) {
error = g_error_new_literal (NM_AGENT_MANAGER_ERROR,
NM_AGENT_MANAGER_ERROR_USER_CANCELED,
"User canceled the secrets request.");