summaryrefslogtreecommitdiff
path: root/libnm-core/nm-setting-bridge-port.c
diff options
context:
space:
mode:
authorDan Winship <danw@gnome.org>2014-10-11 15:02:16 -0400
committerDan Winship <danw@gnome.org>2014-10-22 08:29:07 -0400
commitaeb3d093f66aea3c5bf7e235226bdb0431cf9a9a (patch)
tree016be0b3b0750faa0526bfa0716efce7b452d933 /libnm-core/nm-setting-bridge-port.c
parenta7b1ee77dbc74fa40864e292c75d764b958634b0 (diff)
downloadNetworkManager-aeb3d093f66aea3c5bf7e235226bdb0431cf9a9a.tar.gz
libnm-core: clean up NMConnectionError
Rename NM_CONNECTION_ERROR_UNKNOWN to NM_CONNECTION_ERROR_FAILED, following GError best practices. Replace NM_CONNECTION_ERROR_CONNECTION_SETTING_NOT_FOUND ("no NMSettingConnection") with a more generic NM_CONNECTION_ERROR_MISSING_SETTING. Use that new code in a few places that had previously been using NM_CONNECTION_ERROR_SETTING_NOT_FOUND, which was supposed to mean "the setting that you asked about doesn't exist", not "the connection is invalid because it's missing a required setting". Clarify that NM_CONNECTION_ERROR_INVALID_SETTING can be used for any "invalid or inappropriate NMSetting", not just a "conflicting" one. (But fix a case in nm_connection_update_secrets() that was returning INVALID_SETTING when it should have been return-if-failing instead.) For both MISSING_SETTING and INVALID_SETTING, always prefix the error message with "setting-name: ", just like we do with the various NMSetting MISSING_PROPERTY and INVALID_PROPERTY errors. And make sure that the error message is marked for localization. Drop NM_CONNECTION_ERROR_CONNECTION_TYPE_INVALID, which is pretty pointless; it was only used in the case where connection.type was the name of a valid setting type that is not a base setting type. Instead, just return NM_SETTING_CONNECTION_ERROR_INVALID_PROPERTY for connection.type in this case (which is what the code already did when connection.type was completely unrecognized).
Diffstat (limited to 'libnm-core/nm-setting-bridge-port.c')
-rw-r--r--libnm-core/nm-setting-bridge-port.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libnm-core/nm-setting-bridge-port.c b/libnm-core/nm-setting-bridge-port.c
index ffd21638c8..7651adc233 100644
--- a/libnm-core/nm-setting-bridge-port.c
+++ b/libnm-core/nm-setting-bridge-port.c
@@ -162,7 +162,7 @@ verify (NMSetting *setting, GSList *all_settings, GError **error)
s_con = NM_SETTING_CONNECTION (_nm_setting_find_in_list_required (all_settings,
NM_SETTING_CONNECTION_SETTING_NAME,
- error, NULL, NULL));
+ error));
if (!s_con)
return FALSE;