mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 23:10:29 +01:00
Merge remote-tracking branch 'origin/master' into libnl3
This commit is contained in:
commit
dcc0f835db
2 changed files with 12 additions and 7 deletions
|
|
@ -79,8 +79,6 @@ constructor (GType type,
|
|||
if (!object)
|
||||
return NULL;
|
||||
|
||||
_nm_object_cache_add (NM_OBJECT (object));
|
||||
|
||||
priv = NM_OBJECT_GET_PRIVATE (object);
|
||||
|
||||
if (priv->connection == NULL || priv->path == NULL) {
|
||||
|
|
@ -94,6 +92,8 @@ constructor (GType type,
|
|||
priv->path,
|
||||
"org.freedesktop.DBus.Properties");
|
||||
|
||||
_nm_object_cache_add (NM_OBJECT (object));
|
||||
|
||||
return object;
|
||||
}
|
||||
|
||||
|
|
@ -140,11 +140,15 @@ set_property (GObject *object, guint prop_id,
|
|||
const GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
NMObjectPrivate *priv = NM_OBJECT_GET_PRIVATE (object);
|
||||
DBusGConnection *connection;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_CONNECTION:
|
||||
/* Construct only */
|
||||
priv->connection = dbus_g_connection_ref ((DBusGConnection *) g_value_get_boxed (value));
|
||||
connection = (DBusGConnection *) g_value_get_boxed (value);
|
||||
if (!connection)
|
||||
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
|
||||
priv->connection = dbus_g_connection_ref (connection);
|
||||
break;
|
||||
case PROP_PATH:
|
||||
/* Construct only */
|
||||
|
|
|
|||
|
|
@ -736,9 +736,6 @@ get_all_cb (DBusGProxy *proxy,
|
|||
NMRemoteSettings *
|
||||
nm_remote_settings_new (DBusGConnection *bus)
|
||||
{
|
||||
if (bus == NULL)
|
||||
bus = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
|
||||
|
||||
return (NMRemoteSettings *) g_object_new (NM_TYPE_REMOTE_SETTINGS,
|
||||
NM_REMOTE_SETTINGS_BUS, bus,
|
||||
NULL);
|
||||
|
|
@ -887,11 +884,15 @@ set_property (GObject *object, guint prop_id,
|
|||
const GValue *value, GParamSpec *pspec)
|
||||
{
|
||||
NMRemoteSettingsPrivate *priv = NM_REMOTE_SETTINGS_GET_PRIVATE (object);
|
||||
DBusGConnection *connection;
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_BUS:
|
||||
/* Construct only */
|
||||
priv->bus = dbus_g_connection_ref ((DBusGConnection *) g_value_get_boxed (value));
|
||||
connection = (DBusGConnection *) g_value_get_boxed (value);
|
||||
if (!connection)
|
||||
connection = dbus_g_bus_get (DBUS_BUS_SYSTEM, NULL);
|
||||
priv->bus = dbus_g_connection_ref (connection);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue