summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-11-22 20:09:47 +0100
committerThomas Haller <thaller@redhat.com>2017-11-27 15:21:57 +0100
commit3d118f5b4921e538e6885162af73fd4a67c40f3c (patch)
tree77e4c81ccb4bf5e7e48370a83621a8be16773a02
parent124b905f97aeb6a82c9bb03076fa58464c7e8ead (diff)
downloadNetworkManager-3d118f5b4921e538e6885162af73fd4a67c40f3c.tar.gz
policy: don't log GError code
Our GError codes are mostly meaningless, only the message is interesting. And our messages should anyway be unique, so that one could understand which was the corresponding error code (by inspecting the source code). While at it, use gs_free_error.
-rw-r--r--src/nm-policy.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nm-policy.c b/src/nm-policy.c
index 1d90844ee4..65bbeada7a 100644
--- a/src/nm-policy.c
+++ b/src/nm-policy.c
@@ -1191,7 +1191,7 @@ auto_activate_device (NMPolicy *self,
gs_free char *specific_object = NULL;
gs_free NMSettingsConnection **connections = NULL;
guint i, len;
- GError *error = NULL;
+ gs_free_error GError *error = NULL;
NMAuthSubject *subject;
NMActiveConnection *ac;
@@ -1256,11 +1256,9 @@ auto_activate_device (NMPolicy *self,
NM_ACTIVATION_TYPE_MANAGED,
&error);
if (!ac) {
- _LOGI (LOGD_DEVICE, "connection '%s' auto-activation failed: (%d) %s",
+ _LOGI (LOGD_DEVICE, "connection '%s' auto-activation failed: %s",
nm_settings_connection_get_id (best_connection),
- error->code,
error->message);
- g_error_free (error);
nm_settings_connection_autoconnect_blocked_reason_set (best_connection,
NM_SETTINGS_AUTO_CONNECT_BLOCKED_REASON_FAILED);
schedule_activate_check (self, device);