NetworkManager r4074 - trunk/libnm-util
- From: dcbw svn gnome org
- To: svn-commits-list gnome org
- Subject: NetworkManager r4074 - trunk/libnm-util
- Date: Thu, 18 Sep 2008 13:31:11 +0000 (UTC)
Author: dcbw
Date: Thu Sep 18 13:31:11 2008
New Revision: 4074
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=4074&view=rev
Log:
Fill error when object isn't a connection (Alexander Sack)
Modified:
trunk/libnm-util/nm-connection.c
Modified: trunk/libnm-util/nm-connection.c
==============================================================================
--- trunk/libnm-util/nm-connection.c (original)
+++ trunk/libnm-util/nm-connection.c Thu Sep 18 13:31:11 2008
@@ -458,10 +458,17 @@
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 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]