summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-01-06 15:50:35 +0100
committerThomas Haller <thaller@redhat.com>2015-01-06 15:54:54 +0100
commite4f32abfec761081f671f798f72f5f4f08bd5a00 (patch)
treed74208fce7ed52666ab313abfc05b7667d225814
parent4c629b03104e7ae10b805b956581482a3879f66b (diff)
downloadNetworkManager-e4f32abfec761081f671f798f72f5f4f08bd5a00.tar.gz
Revert "ifcfg-rh: avoid passing NULL error to connection_from_file_full()"
This reverts commit 35988ec633bc7dc9a4f85b17b5a59f62645e0f7d. Since commit ffe0fde235aed7cf6341843adc1488995f8cc346, wireless_connection_from_ifcfg() accepts a missing @error argument. Revert this commit because the caller then can control whether to log the error by providing @error.
-rw-r--r--src/settings/plugins/ifcfg-rh/reader.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/settings/plugins/ifcfg-rh/reader.c b/src/settings/plugins/ifcfg-rh/reader.c
index e5545579b4..4ecdf1ae54 100644
--- a/src/settings/plugins/ifcfg-rh/reader.c
+++ b/src/settings/plugins/ifcfg-rh/reader.c
@@ -4827,18 +4827,13 @@ connection_from_file (const char *filename,
{
gboolean ignore_error = FALSE;
NMConnection *conn;
- GError *local = NULL;
conn = connection_from_file_full (filename, NULL, NULL,
out_unhandled,
- &local,
+ error,
&ignore_error);
- if (local) {
- if (!ignore_error)
- PARSE_WARNING ("%s", local->message);
- g_propagate_error (error, local);
- }
-
+ if (error && *error && !ignore_error)
+ PARSE_WARNING ("%s", (*error)->message);
return conn;
}