summaryrefslogtreecommitdiff
path: root/src/nm-activation-request.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-02-28 20:43:06 -0600
committerDan Williams <dcbw@redhat.com>2012-03-01 17:40:18 -0600
commit33d0cff3e45153678eed6c5610ade75eec972749 (patch)
tree4ddbf8fce5f72022e2c0fd1a4cd078a43d02f635 /src/nm-activation-request.c
parent9146d4e8c61de6d7a39e288d9173d4d5ca36b8d0 (diff)
downloadNetworkManager-33d0cff3e45153678eed6c5610ade75eec972749.tar.gz
core: use active connection dependency master instead of manually setting it
We already have the master device kept in the active connection, so we can just use that instead of having the Policy determine and set it manually. This also should allow slaves to auto-activate their master connections if the master is able to activate.
Diffstat (limited to 'src/nm-activation-request.c')
-rw-r--r--src/nm-activation-request.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
index 56ca774a8f..3fc7b538dc 100644
--- a/src/nm-activation-request.c
+++ b/src/nm-activation-request.c
@@ -504,10 +504,16 @@ get_property (GObject *object, guint prop_id,
GValue *value, GParamSpec *pspec)
{
NMActRequestPrivate *priv = NM_ACT_REQUEST_GET_PRIVATE (object);
+ NMDevice *master;
switch (prop_id) {
case PROP_MASTER:
- g_value_set_string (value, nm_device_get_master_path (priv->device));
+ if (priv->dep && NM_IS_ACT_REQUEST (priv->dep)) {
+ master = NM_DEVICE (nm_act_request_get_device (NM_ACT_REQUEST (priv->dep)));
+ g_assert (master);
+ g_value_set_boxed (value, nm_device_get_path (master));
+ } else
+ g_value_set_boxed (value, "/");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);