diff options
author | Dan Williams <dcbw@redhat.com> | 2008-11-19 16:20:47 +0000 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2008-11-19 16:20:47 +0000 |
commit | c47cdcf0e745adefb662c747da3c2ec370fab53a (patch) | |
tree | 29b7bd2393530378627a92c16d03d7bcd61c3c37 | |
parent | 3c2d8253ec19ac1659c0b8f6981efd971315779c (diff) | |
download | NetworkManager-c47cdcf0e745adefb662c747da3c2ec370fab53a.tar.gz |
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
-rw-r--r-- | libnm-util/nm-setting.c | 6 | ||||
-rw-r--r-- | libnm-util/nm-setting.h | 8 | ||||
-rw-r--r-- | src/nm-device.c | 2 | ||||
-rw-r--r-- | src/nm-manager.c | 4 | ||||
-rw-r--r-- | system-settings/plugins/ifcfg-fedora/plugin.c | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/libnm-util/nm-setting.c b/libnm-util/nm-setting.c index 426e83229a..1d9477c6ce 100644 --- a/libnm-util/nm-setting.c +++ b/libnm-util/nm-setting.c @@ -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; diff --git a/libnm-util/nm-setting.h b/libnm-util/nm-setting.h index 1a6c2937f2..833756b27b 100644 --- a/libnm-util/nm-setting.h +++ b/libnm-util/nm-setting.h @@ -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 */ diff --git a/src/nm-device.c b/src/nm-device.c index 5cf26d905b..02e4fc19cf 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -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, diff --git a/src/nm-manager.c b/src/nm-manager.c index bf0b40252b..9133368918 100644 --- a/src/nm-manager.c +++ b/src/nm-manager.c @@ -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); diff --git a/system-settings/plugins/ifcfg-fedora/plugin.c b/system-settings/plugins/ifcfg-fedora/plugin.c index bd89590185..6efd673a72 100644 --- a/system-settings/plugins/ifcfg-fedora/plugin.c +++ b/system-settings/plugins/ifcfg-fedora/plugin.c @@ -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); |