summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-ip6-config.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2013-03-01 22:58:31 +0100
committerDan Williams <dcbw@redhat.com>2013-04-08 11:30:32 -0500
commit661d09852d9b572932a6229a4092be6ee670cfab (patch)
treea931cb9998fb00cdf2a6a5d21fa1139a2580df80 /libnm-glib/nm-ip6-config.c
parent44f350c99d0a7e7fed66b5fd839e5f97335610a6 (diff)
downloadNetworkManager-661d09852d9b572932a6229a4092be6ee670cfab.tar.gz
libnm-glib: use helpers to create dbus proxies
When using a private connection, we need to use dbus_g_proxy_new_for_peer() because the bus isn't involved. Since many parts of libnm-glib create a proxy for their corresponding remote object, consolidate the proxy creation logic. A later patch will add logic to use a private connection versus a bus-based one.
Diffstat (limited to 'libnm-glib/nm-ip6-config.c')
-rw-r--r--libnm-glib/nm-ip6-config.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/libnm-glib/nm-ip6-config.c b/libnm-glib/nm-ip6-config.c
index 988dcd3034..b651b0dd45 100644
--- a/libnm-glib/nm-ip6-config.c
+++ b/libnm-glib/nm-ip6-config.c
@@ -219,19 +219,11 @@ nm_ip6_config_get_routes (NMIP6Config *config)
static void
constructed (GObject *object)
{
- DBusGConnection *connection;
- NMIP6ConfigPrivate *priv;
+ NMIP6ConfigPrivate *priv = NM_IP6_CONFIG_GET_PRIVATE (object);
G_OBJECT_CLASS (nm_ip6_config_parent_class)->constructed (object);
- priv = NM_IP6_CONFIG_GET_PRIVATE (object);
- connection = nm_object_get_connection (NM_OBJECT (object));
-
- priv->proxy = dbus_g_proxy_new_for_name (connection,
- NM_DBUS_SERVICE,
- nm_object_get_path (NM_OBJECT (object)),
- NM_DBUS_INTERFACE_IP6_CONFIG);
-
+ priv->proxy = _nm_object_new_proxy (NM_OBJECT (object), NULL, NM_DBUS_INTERFACE_IP6_CONFIG);
register_properties (NM_IP6_CONFIG (object));
}