Merge remote branch 'origin/master' into ip6only

This commit is contained in:
Dan Williams
2010-04-22 14:20:24 -07:00
4 changed files with 30 additions and 6 deletions

View File

@@ -130,6 +130,7 @@ global:
nm_settings_connection_interface_get_type;
nm_settings_connection_interface_update;
nm_settings_interface_add_connection;
nm_settings_interface_error_get_type;
nm_settings_interface_error_quark;
nm_settings_interface_get_connection_by_path;
nm_settings_interface_get_type;

View File

@@ -228,7 +228,9 @@ impl_exported_connection_get_secrets (NMExportedConnection *self,
if (NM_EXPORTED_CONNECTION_GET_CLASS (self)->get_secrets)
NM_EXPORTED_CONNECTION_GET_CLASS (self)->get_secrets (self, setting_name, hints, request_new, context);
else {
error = g_error_new (0, 0, "%s: %s:%d get_secrets() unimplemented", __func__, __FILE__, __LINE__);
error = g_error_new (NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
"%s: %s:%d get_secrets() unimplemented", __func__, __FILE__, __LINE__);
dbus_g_method_return_error (context, error);
g_error_free (error);
}

View File

@@ -1475,7 +1475,12 @@ nm_sysconfig_settings_class_init (NMSysconfigSettingsClass *class)
NM_DBUS_IFACE_SETTINGS_SYSTEM,
NM_TYPE_SYSCONFIG_SETTINGS_ERROR);
dbus_g_error_domain_register (NM_SETTINGS_INTERFACE_ERROR,
NM_DBUS_IFACE_SETTINGS,
NM_TYPE_SETTINGS_INTERFACE_ERROR);
/* And register all the settings errors with D-Bus */
dbus_g_error_domain_register (NM_CONNECTION_ERROR, NULL, NM_TYPE_CONNECTION_ERROR);
dbus_g_error_domain_register (NM_SETTING_802_1X_ERROR, NULL, NM_TYPE_SETTING_802_1X_ERROR);
dbus_g_error_domain_register (NM_SETTING_BLUETOOTH_ERROR, NULL, NM_TYPE_SETTING_BLUETOOTH_ERROR);
dbus_g_error_domain_register (NM_SETTING_CDMA_ERROR, NULL, NM_TYPE_SETTING_CDMA_ERROR);

View File

@@ -38,6 +38,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <nm-setting-connection.h>
#include <nm-settings-interface.h>
#include "common.h"
#include "nm-dbus-glib-types.h"
@@ -535,31 +536,46 @@ impl_ifcfgrh_get_ifcfg_details (SCPluginIfcfg *plugin,
const char *path;
if (!g_path_is_absolute (in_ifcfg)) {
g_set_error (error, 0, 0, "ifcfg path '%s' is not absolute", in_ifcfg);
g_set_error (error,
NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION,
"ifcfg path '%s' is not absolute", in_ifcfg);
return FALSE;
}
connection = g_hash_table_lookup (priv->connections, in_ifcfg);
if (!connection) {
g_set_error (error, 0, 0, "ifcfg file '%s' unknown", in_ifcfg);
g_set_error (error,
NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INVALID_CONNECTION,
"ifcfg file '%s' unknown", in_ifcfg);
return FALSE;
}
s_con = (NMSettingConnection *) nm_connection_get_setting (NM_CONNECTION (connection), NM_TYPE_SETTING_CONNECTION);
if (!s_con) {
g_set_error_literal (error, 0, 0, "unable to retrieve the connection setting");
g_set_error (error,
NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
"unable to retrieve the connection setting");
return FALSE;
}
uuid = nm_setting_connection_get_uuid (s_con);
if (!uuid) {
g_set_error_literal (error, 0, 0, "unable to get the UUID");
g_set_error (error,
NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
"unable to get the UUID");
return FALSE;
}
path = nm_connection_get_path (NM_CONNECTION (connection));
if (!path) {
g_set_error_literal (error, 0, 0, "unable to get the connection D-Bus path");
g_set_error (error,
NM_SETTINGS_INTERFACE_ERROR,
NM_SETTINGS_INTERFACE_ERROR_INTERNAL_ERROR,
"unable to get the connection D-Bus path");
return FALSE;
}