2008-11-19 Dan Williams <dcbw@redhat.com>

* libnm-util/nm-setting.h
	  libnm-util/nm-setting.c
	  src/nm-device.c
	  src/nm-manager.c
	  system-settings/plugins/ifcfg-fedora/plugin.c
		- Prefix compare flag defines with NM_SETTING_



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4299 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2008-11-19 16:20:47 +00:00
parent 3c2d8253ec
commit c47cdcf0e7
5 changed files with 11 additions and 11 deletions

View File

@@ -238,14 +238,14 @@ nm_setting_compare (NMSetting *setting,
/* Fuzzy compare ignores secrets and properties defined with the
* FUZZY_IGNORE flag
*/
if ( (flags & COMPARE_FLAGS_FUZZY)
if ( (flags & NM_SETTING_COMPARE_FLAG_FUZZY)
&& (prop_spec->flags & (NM_SETTING_PARAM_FUZZY_IGNORE | NM_SETTING_PARAM_SECRET)))
continue;
if ((flags & COMPARE_FLAGS_IGNORE_SECRETS) && (prop_spec->flags & NM_SETTING_PARAM_SECRET))
if ((flags & NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS) && (prop_spec->flags & NM_SETTING_PARAM_SECRET))
continue;
if ( (flags & COMPARE_FLAGS_IGNORE_ID)
if ( (flags & NM_SETTING_COMPARE_FLAG_IGNORE_ID)
&& !strcmp (nm_setting_get_name (setting), NM_SETTING_CONNECTION_SETTING_NAME)
&& !strcmp (prop_spec->name, NM_SETTING_CONNECTION_ID))
continue;

View File

@@ -88,16 +88,16 @@ gboolean nm_setting_verify (NMSetting *setting,
typedef enum {
/* Match all attributes exactly */
COMPARE_FLAGS_EXACT = 0x00000000,
NM_SETTING_COMPARE_FLAG_EXACT = 0x00000000,
/* Match only important attributes, like SSID, type, security settings, etc */
COMPARE_FLAGS_FUZZY = 0x00000001,
NM_SETTING_COMPARE_FLAG_FUZZY = 0x00000001,
/* Ignore the connection ID */
COMPARE_FLAGS_IGNORE_ID = 0x00000002,
NM_SETTING_COMPARE_FLAG_IGNORE_ID = 0x00000002,
/* Ignore secrets */
COMPARE_FLAGS_IGNORE_SECRETS = 0x00000004
NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS = 0x00000004
} NMSettingCompareFlags;
/* Returns TRUE if the connections are the same */

View File

@@ -1625,7 +1625,7 @@ device_activation_precheck (NMDevice *self, NMConnection *connection, GError **e
// FIXME: why not just check connection path & service?
current_connection = nm_act_request_get_connection (nm_device_get_act_request (self));
if (nm_connection_compare (connection, current_connection, COMPARE_FLAGS_EXACT)) {
if (nm_connection_compare (connection, current_connection, NM_SETTING_COMPARE_FLAG_EXACT)) {
/* Already activating or activated with the same connection */
g_set_error (error,
NM_DEVICE_INTERFACE_ERROR,

View File

@@ -845,7 +845,7 @@ connection_get_settings_cb (DBusGProxy *proxy,
switch (scope) {
case NM_CONNECTION_SCOPE_USER:
existing = g_hash_table_lookup (priv->user_connections, path);
if (!existing || !nm_connection_compare (existing, connection, COMPARE_FLAGS_EXACT)) {
if (!existing || !nm_connection_compare (existing, connection, NM_SETTING_COMPARE_FLAG_EXACT)) {
g_hash_table_insert (priv->user_connections,
g_strdup (path),
connection);
@@ -856,7 +856,7 @@ connection_get_settings_cb (DBusGProxy *proxy,
break;
case NM_CONNECTION_SCOPE_SYSTEM:
existing = g_hash_table_lookup (priv->system_connections, path);
if (!existing || !nm_connection_compare (existing, connection, COMPARE_FLAGS_EXACT)) {
if (!existing || !nm_connection_compare (existing, connection, NM_SETTING_COMPARE_FLAG_EXACT)) {
g_hash_table_insert (priv->system_connections,
g_strdup (path),
connection);

View File

@@ -339,7 +339,7 @@ connection_changed_handler (SCPluginIfcfg *plugin,
}
/* Only update if different */
if (!nm_connection_compare (new_wrapped, old_wrapped, COMPARE_FLAGS_EXACT)) {
if (!nm_connection_compare (new_wrapped, old_wrapped, NM_SETTING_COMPARE_FLAG_EXACT)) {
settings = nm_connection_to_hash (new_wrapped);
nm_exported_connection_update (NM_EXPORTED_CONNECTION (connection), settings, NULL);
g_hash_table_destroy (settings);