mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 00:10:11 +01:00
Fill error when object isn't a connection (Alexander Sack)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4074 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
5735b02376
commit
d2ef616e51
1 changed files with 8 additions and 1 deletions
|
|
@ -458,10 +458,17 @@ nm_connection_verify (NMConnection *connection, GError **error)
|
|||
NMSetting *s_con;
|
||||
VerifySettingsInfo info;
|
||||
|
||||
g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
|
||||
if (error)
|
||||
g_return_val_if_fail (*error == NULL, FALSE);
|
||||
|
||||
if (!NM_IS_CONNECTION (connection)) {
|
||||
g_set_error (error,
|
||||
NM_SETTING_CONNECTION_ERROR,
|
||||
NM_SETTING_CONNECTION_ERROR_UNKNOWN,
|
||||
"invalid connection; failed verification");
|
||||
g_return_val_if_fail (NM_IS_CONNECTION (connection), FALSE);
|
||||
}
|
||||
|
||||
priv = NM_CONNECTION_GET_PRIVATE (connection);
|
||||
|
||||
/* First, make sure there's at least 'connection' setting */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue