summaryrefslogtreecommitdiff
path: root/src/NetworkManagerPolicy.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-11-15 15:52:42 +0000
committerDan Williams <dcbw@redhat.com>2007-11-15 15:52:42 +0000
commitdcc6b2a9c0107ebe8cf2e805bb6839706bceff77 (patch)
tree0112ca2cb6ebccb5b63146523847c4305d81a5dd /src/NetworkManagerPolicy.c
parent29c735dca44bb2ada05317a157fab73b356567e0 (diff)
downloadNetworkManager-dcc6b2a9c0107ebe8cf2e805bb6839706bceff77.tar.gz
2007-11-15 Dan Williams <dcbw@redhat.com>
* libnm-util/nm-setting-connection.h libnm-util/nm-setting-connection.c - Rename the 'name' property to 'id', because it conflicted with the NMSetting superclass' 'name' property. * libnm-util/nm-setting.c - (nm_setting_to_hash): serialize the 'name' property - (one_property_cb): ignore 'name' on deserialization of a connection * src/nm-device-802-11-wireless.c src/vpn-manager/nm-vpn-connection.c src/NetworkManagerPolicy.c - Fix up for NMSettingConnection 'name'->'id' changes git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3084 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Diffstat (limited to 'src/NetworkManagerPolicy.c')
-rw-r--r--src/NetworkManagerPolicy.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c
index 04d06cf370..60a4d4ce74 100644
--- a/src/NetworkManagerPolicy.c
+++ b/src/NetworkManagerPolicy.c
@@ -60,7 +60,7 @@ static NMPolicy *global_policy;
static const char *
-get_connection_name (NMConnection *connection)
+get_connection_id (NMConnection *connection)
{
NMSettingConnection *s_con;
@@ -69,7 +69,7 @@ get_connection_name (NMConnection *connection)
s_con = (NMSettingConnection *) nm_connection_get_setting (connection, NM_TYPE_SETTING_CONNECTION);
g_return_val_if_fail (s_con != NULL, NULL);
- return s_con->name;
+ return s_con->id;
}
/*
@@ -202,7 +202,7 @@ nm_policy_auto_get_best_device (NMPolicy *policy,
nm_info ("AUTO: Best wired device = %s, best wireless device = %s, best connection name = '%s'",
best_wired_dev ? nm_device_get_iface (NM_DEVICE (best_wired_dev)) : "(null)",
best_wireless_dev ? nm_device_get_iface (NM_DEVICE (best_wireless_dev)) : "(null)",
- *connection ? get_connection_name (*connection) : "(none)");
+ *connection ? get_connection_id (*connection) : "(none)");
}
return *connection ? highest_priority_dev : NULL;
@@ -303,14 +303,14 @@ nm_policy_device_change_check (gpointer user_data)
} else if (!old_dev && new_dev) {
/* Activate new device */
nm_info ("SWITCH: no current connection, found better connection '%s (%s)'.",
- connection ? get_connection_name (connection) : "(none)",
+ connection ? get_connection_id (connection) : "(none)",
nm_device_get_iface (new_dev));
do_switch = TRUE;
} else if (old_dev && !new_dev) {
/* Terminate current connection */
nm_info ("SWITCH: terminating current connection '%s (%s)' because it's"
" no longer valid.",
- old_connection ? get_connection_name (old_connection) : "(none)",
+ old_connection ? get_connection_id (old_connection) : "(none)",
nm_device_get_iface (old_dev));
do_switch = TRUE;
} else if (old_dev && new_dev) {
@@ -325,9 +325,9 @@ nm_policy_device_change_check (gpointer user_data)
if ((!old_user_requested || !old_has_link) && (new_dev != old_dev)) {
nm_info ("SWITCH: found better connection '%s (%s)' than "
" current connection '%s (%s)'.",
- connection ? get_connection_name (connection) : "(none)",
+ connection ? get_connection_id (connection) : "(none)",
nm_device_get_iface (new_dev),
- old_connection ? get_connection_name (old_connection) : "(none)",
+ old_connection ? get_connection_id (old_connection) : "(none)",
nm_device_get_iface (old_dev));
do_switch = TRUE;
}
@@ -352,9 +352,9 @@ nm_policy_device_change_check (gpointer user_data)
" than current connection '%s/%s'. "
"have_link=%d",
nm_device_get_iface (new_dev),
- new_sc->name,
+ new_sc->id,
nm_device_get_iface (old_dev),
- old_sc->name,
+ old_sc->id,
old_has_link);
do_switch = TRUE;
}
@@ -427,7 +427,7 @@ device_state_changed (NMDevice *device, NMDeviceState state, gpointer user_data)
/* Mark the connection invalid so it doesn't get automatically chosen */
if (connection) {
g_object_set_data (G_OBJECT (connection), INVALID_TAG, GUINT_TO_POINTER (TRUE));
- nm_info ("Marking connection '%s' invalid.", get_connection_name (connection));
+ nm_info ("Marking connection '%s' invalid.", get_connection_id (connection));
}
} else if (state == NM_DEVICE_STATE_ACTIVATED) {
/* Clear the invalid tag on the connection */