From e4f32abfec761081f671f798f72f5f4f08bd5a00 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 6 Jan 2015 15:50:35 +0100 Subject: 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. --- src/settings/plugins/ifcfg-rh/reader.c | 11 +++-------- 1 file 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; } -- cgit v1.2.1