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.
This commit is contained in:
Dan Williams
2012-02-28 20:43:06 -06:00
parent 9146d4e8c6
commit 33d0cff3e4
7 changed files with 19 additions and 86 deletions

View File

@@ -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);