system-settings: return InvalidSetting when secrets setting doesn't exist (bgo #623744)

So that clients can handle the error intelligently; it's not
really a fatal error.
This commit is contained in:
Dan Williams 2010-07-21 15:54:44 -07:00
parent e58ca7af4b
commit d51e36f72d

View file

@ -209,7 +209,7 @@ get_secrets (NMSettingsConnectionInterface *connection,
setting = nm_connection_get_setting_by_name (priv->secrets, setting_name);
if (!setting) {
error = g_error_new (NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION,
NM_SETTINGS_INTERFACE_ERROR_INVALID_SETTING,
"%s.%d - Connection didn't have requested setting '%s'.",
__FILE__, __LINE__, setting_name);
(*callback) (connection, NULL, error, user_data);