Commit d6905a8d authored by Jiří Klimeš's avatar Jiří Klimeš

libnm-glib: add GError parameter to _nm_object_get_... functions

It allows us to get the error back and have control over printing
the error.
parent ec115ed4
......@@ -140,7 +140,7 @@ libnm_glib_la_LIBADD = \
$(GUDEV_LIBS)
libnm_glib_la_LDFLAGS = -Wl,--version-script=$(srcdir)/libnm-glib.ver \
-version-info "3:0:0"
-version-info "3:1:0"
noinst_PROGRAMS = libnm-glib-test
......
......@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
* Copyright (C) 2007 - 2008 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
*/
#include <string.h>
......@@ -114,7 +114,8 @@ nm_access_point_get_flags (NMAccessPoint *ap)
if (!priv->flags) {
priv->flags = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_FLAGS);
DBUS_PROP_FLAGS,
NULL);
}
return priv->flags;
......@@ -139,7 +140,8 @@ nm_access_point_get_wpa_flags (NMAccessPoint *ap)
if (!priv->wpa_flags) {
priv->wpa_flags = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_WPA_FLAGS);
DBUS_PROP_WPA_FLAGS,
NULL);
}
return priv->wpa_flags;
......@@ -164,7 +166,8 @@ nm_access_point_get_rsn_flags (NMAccessPoint *ap)
if (!priv->rsn_flags) {
priv->rsn_flags = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_RSN_FLAGS);
DBUS_PROP_RSN_FLAGS,
NULL);
}
return priv->rsn_flags;
......@@ -190,7 +193,8 @@ nm_access_point_get_ssid (NMAccessPoint *ap)
if (!priv->ssid) {
priv->ssid = _nm_object_get_byte_array_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_SSID);
DBUS_PROP_SSID,
NULL);
}
return priv->ssid;
......@@ -215,7 +219,8 @@ nm_access_point_get_frequency (NMAccessPoint *ap)
if (!priv->frequency) {
priv->frequency = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_FREQUENCY);
DBUS_PROP_FREQUENCY,
NULL);
}
return priv->frequency;
......@@ -241,7 +246,8 @@ nm_access_point_get_hw_address (NMAccessPoint *ap)
if (!priv->hw_address) {
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_HW_ADDRESS);
DBUS_PROP_HW_ADDRESS,
NULL);
}
return priv->hw_address;
......@@ -266,7 +272,8 @@ nm_access_point_get_mode (NMAccessPoint *ap)
if (!priv->mode) {
priv->mode = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_MODE);
DBUS_PROP_MODE,
NULL);
}
return priv->mode;
......@@ -291,7 +298,8 @@ nm_access_point_get_max_bitrate (NMAccessPoint *ap)
if (!priv->max_bitrate) {
priv->max_bitrate = _nm_object_get_uint_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_MAX_BITRATE);
DBUS_PROP_MAX_BITRATE,
NULL);
}
return priv->max_bitrate;
......@@ -316,7 +324,8 @@ nm_access_point_get_strength (NMAccessPoint *ap)
if (!priv->strength) {
priv->strength = _nm_object_get_byte_property (NM_OBJECT (ap),
NM_DBUS_INTERFACE_ACCESS_POINT,
DBUS_PROP_STRENGTH);
DBUS_PROP_STRENGTH,
NULL);
}
return priv->strength;
......
......@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2010 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
......@@ -111,7 +111,8 @@ nm_active_connection_get_connection (NMActiveConnection *connection)
if (!priv->connection) {
priv->connection = _nm_object_get_string_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_CONNECTION);
DBUS_PROP_CONNECTION,
NULL);
}
return priv->connection;
......@@ -137,7 +138,8 @@ nm_active_connection_get_specific_object (NMActiveConnection *connection)
if (!priv->specific_object) {
priv->specific_object = _nm_object_get_string_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_SPECIFIC_OBJECT);
DBUS_PROP_SPECIFIC_OBJECT,
NULL);
}
return priv->specific_object;
......@@ -167,7 +169,8 @@ nm_active_connection_get_devices (NMActiveConnection *connection)
if (!_nm_object_get_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_DEVICES,
&value)) {
&value,
NULL)) {
return NULL;
}
......@@ -196,7 +199,8 @@ nm_active_connection_get_state (NMActiveConnection *connection)
if (!priv->state) {
priv->state = _nm_object_get_uint_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_STATE);
DBUS_PROP_STATE,
NULL);
}
return priv->state;
......@@ -222,7 +226,8 @@ nm_active_connection_get_default (NMActiveConnection *connection)
if (!priv->is_default) {
priv->is_default = _nm_object_get_boolean_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_DEFAULT);
DBUS_PROP_DEFAULT,
NULL);
}
return priv->is_default;
......@@ -248,7 +253,8 @@ nm_active_connection_get_default6 (NMActiveConnection *connection)
if (!priv->is_default6) {
priv->is_default6 = _nm_object_get_boolean_property (NM_OBJECT (connection),
NM_DBUS_INTERFACE_ACTIVE_CONNECTION,
DBUS_PROP_DEFAULT6);
DBUS_PROP_DEFAULT6,
NULL);
}
return priv->is_default6;
......
......@@ -157,8 +157,9 @@ update_wireless_status (NMClient *client, gboolean notify)
gboolean poke = FALSE;
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WirelessHardwareEnabled");
NM_DBUS_INTERFACE,
"WirelessHardwareEnabled",
NULL);
if (val != priv->wireless_hw_enabled) {
priv->wireless_hw_enabled = val;
poke = TRUE;
......@@ -170,8 +171,9 @@ update_wireless_status (NMClient *client, gboolean notify)
val = FALSE;
else
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WirelessEnabled");
NM_DBUS_INTERFACE,
"WirelessEnabled",
NULL);
if (val != priv->wireless_enabled) {
priv->wireless_enabled = val;
poke = TRUE;
......@@ -197,7 +199,8 @@ update_wwan_status (NMClient *client, gboolean notify)
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WwanHardwareEnabled");
"WwanHardwareEnabled",
NULL);
if (val != priv->wwan_hw_enabled) {
priv->wwan_hw_enabled = val;
if (notify)
......@@ -209,7 +212,8 @@ update_wwan_status (NMClient *client, gboolean notify)
else {
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WwanEnabled");
"WwanEnabled",
NULL);
}
if (val != priv->wwan_enabled) {
......@@ -228,7 +232,8 @@ update_wimax_status (NMClient *client, gboolean notify)
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WimaxHardwareEnabled");
"WimaxHardwareEnabled",
NULL);
if (val != priv->wimax_hw_enabled) {
priv->wimax_hw_enabled = val;
if (notify)
......@@ -240,7 +245,8 @@ update_wimax_status (NMClient *client, gboolean notify)
else {
val = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"WimaxEnabled");
"WimaxEnabled",
NULL);
}
if (val != priv->wimax_enabled) {
......@@ -1275,11 +1281,12 @@ nm_client_get_active_connections (NMClient *client)
if (!_nm_object_get_property (NM_OBJECT (client),
"org.freedesktop.NetworkManager",
"ActiveConnections",
&value)) {
&value,
NULL)) {
return NULL;
}
demarshal_active_connections (NM_OBJECT (client), NULL, &value, &priv->active_connections);
demarshal_active_connections (NM_OBJECT (client), NULL, &value, &priv->active_connections);
g_value_unset (&value);
return handle_ptr_array_return (priv->active_connections);
......@@ -1471,7 +1478,7 @@ nm_client_get_state (NMClient *client)
return NM_STATE_UNKNOWN;
if (priv->state == NM_STATE_UNKNOWN)
priv->state = _nm_object_get_uint_property (NM_OBJECT (client), NM_DBUS_INTERFACE, "State");
priv->state = _nm_object_get_uint_property (NM_OBJECT (client), NM_DBUS_INTERFACE, "State", NULL);
return priv->state;
}
......@@ -1497,7 +1504,8 @@ nm_client_networking_get_enabled (NMClient *client)
if (!priv->networking_enabled) {
priv->networking_enabled = _nm_object_get_boolean_property (NM_OBJECT (client),
NM_DBUS_INTERFACE,
"NetworkingEnabled");
"NetworkingEnabled",
NULL);
priv->have_networking_enabled = TRUE;
}
}
......
......@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
* Copyright (C) 2007 - 2009 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
*/
#include "nm-device-bt.h"
......@@ -96,7 +96,8 @@ nm_device_bt_get_hw_address (NMDeviceBt *device)
if (!priv->hw_address) {
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_BLUETOOTH,
DBUS_PROP_HW_ADDRESS);
DBUS_PROP_HW_ADDRESS,
NULL);
}
return priv->hw_address;
......@@ -121,7 +122,8 @@ nm_device_bt_get_name (NMDeviceBt *device)
if (!priv->name) {
priv->name = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_BLUETOOTH,
DBUS_PROP_NAME);
DBUS_PROP_NAME,
NULL);
}
return priv->name;
......@@ -146,7 +148,8 @@ nm_device_bt_get_capabilities (NMDeviceBt *device)
if (!priv->bt_capabilities_valid) {
priv->bt_capabilities = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_BLUETOOTH,
DBUS_PROP_BT_CAPABILITIES);
DBUS_PROP_BT_CAPABILITIES,
NULL);
priv->bt_capabilities_valid = TRUE;
}
......
......@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
* Copyright (C) 2007 - 2010 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
*/
#include "nm-device-ethernet.h"
......@@ -99,7 +99,8 @@ nm_device_ethernet_get_hw_address (NMDeviceEthernet *device)
if (!priv->hw_address) {
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_HW_ADDRESS);
DBUS_PROP_HW_ADDRESS,
NULL);
}
return priv->hw_address;
......@@ -125,7 +126,8 @@ nm_device_ethernet_get_permanent_hw_address (NMDeviceEthernet *device)
if (!priv->perm_hw_address) {
priv->perm_hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_PERM_HW_ADDRESS);
DBUS_PROP_PERM_HW_ADDRESS,
NULL);
}
return priv->perm_hw_address;
......@@ -150,7 +152,8 @@ nm_device_ethernet_get_speed (NMDeviceEthernet *device)
if (!priv->speed) {
priv->speed = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_SPEED);
DBUS_PROP_SPEED,
NULL);
}
return priv->speed;
......@@ -175,7 +178,8 @@ nm_device_ethernet_get_carrier (NMDeviceEthernet *device)
if (!priv->carrier_valid) {
priv->carrier = _nm_object_get_boolean_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRED,
DBUS_PROP_CARRIER);
DBUS_PROP_CARRIER,
NULL);
priv->carrier_valid = TRUE;
}
......
......@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
* Copyright (C) 2007 - 2010 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
*/
#include <string.h>
......@@ -125,7 +125,8 @@ nm_device_wifi_get_hw_address (NMDeviceWifi *device)
if (!priv->hw_address) {
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_HW_ADDRESS);
DBUS_PROP_HW_ADDRESS,
NULL);
}
return priv->hw_address;
......@@ -151,7 +152,8 @@ nm_device_wifi_get_permanent_hw_address (NMDeviceWifi *device)
if (!priv->perm_hw_address) {
priv->perm_hw_address = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_PERM_HW_ADDRESS);
DBUS_PROP_PERM_HW_ADDRESS,
NULL);
}
return priv->perm_hw_address;
......@@ -176,7 +178,8 @@ nm_device_wifi_get_mode (NMDeviceWifi *device)
if (!priv->mode) {
priv->mode = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_MODE);
DBUS_PROP_MODE,
NULL);
}
return priv->mode;
......@@ -215,7 +218,8 @@ nm_device_wifi_get_bitrate (NMDeviceWifi *device)
if (!priv->rate) {
priv->rate = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_BITRATE);
DBUS_PROP_BITRATE,
NULL);
}
return priv->rate;
......@@ -240,7 +244,8 @@ nm_device_wifi_get_capabilities (NMDeviceWifi *device)
if (!priv->wireless_caps) {
priv->wireless_caps = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_WIRELESS_CAPABILITIES);
DBUS_PROP_WIRELESS_CAPABILITIES,
NULL);
}
return priv->wireless_caps;
......@@ -285,7 +290,8 @@ nm_device_wifi_get_active_access_point (NMDeviceWifi *device)
path = _nm_object_get_object_path_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE_WIRELESS,
DBUS_PROP_ACTIVE_ACCESS_POINT);
DBUS_PROP_ACTIVE_ACCESS_POINT,
NULL);
if (path) {
g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
g_value_take_boxed (&value, path);
......
......@@ -125,8 +125,9 @@ nm_device_wimax_get_hw_address (NMDeviceWimax *wimax)
priv = NM_DEVICE_WIMAX_GET_PRIVATE (wimax);
if (!priv->hw_address) {
priv->hw_address = _nm_object_get_string_property (NM_OBJECT (wimax),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_HW_ADDRESS);
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_HW_ADDRESS,
NULL);
}
return priv->hw_address;
......@@ -170,8 +171,9 @@ nm_device_wimax_get_active_nsp (NMDeviceWimax *wimax)
return NULL;
path = _nm_object_get_object_path_property (NM_OBJECT (wimax),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_ACTIVE_NSP);
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_ACTIVE_NSP,
NULL);
if (path) {
g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
g_value_take_boxed (&value, path);
......@@ -359,7 +361,8 @@ nm_device_wimax_get_center_frequency (NMDeviceWimax *self)
if (!priv->center_freq) {
priv->center_freq = _nm_object_get_uint_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_CENTER_FREQUENCY);
DBUS_PROP_CENTER_FREQUENCY,
NULL);
}
return priv->center_freq;
}
......@@ -386,7 +389,8 @@ nm_device_wimax_get_rssi (NMDeviceWimax *self)
if (!priv->rssi) {
priv->rssi = _nm_object_get_int_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_RSSI);
DBUS_PROP_RSSI,
NULL);
}
return priv->rssi;
}
......@@ -412,7 +416,8 @@ nm_device_wimax_get_cinr (NMDeviceWimax *self)
if (!priv->cinr) {
priv->cinr = _nm_object_get_int_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_CINR);
DBUS_PROP_CINR,
NULL);
}
return priv->cinr;
}
......@@ -438,7 +443,8 @@ nm_device_wimax_get_tx_power (NMDeviceWimax *self)
if (!priv->tx_power) {
priv->tx_power = _nm_object_get_int_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_TX_POWER);
DBUS_PROP_TX_POWER,
NULL);
}
return priv->tx_power;
}
......@@ -462,7 +468,8 @@ nm_device_wimax_get_bsid (NMDeviceWimax *self)
if (!priv->bsid) {
priv->bsid = _nm_object_get_string_property (NM_OBJECT (self),
NM_DBUS_INTERFACE_DEVICE_WIMAX,
DBUS_PROP_BSID);
DBUS_PROP_BSID,
NULL);
}
return priv->bsid;
}
......
......@@ -18,7 +18,7 @@
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2007 - 2008 Novell, Inc.
* Copyright (C) 2007 - 2010 Red Hat, Inc.
* Copyright (C) 2007 - 2011 Red Hat, Inc.
*/
#include <string.h>
......@@ -765,7 +765,8 @@ nm_device_get_iface (NMDevice *device)
if (!priv->iface) {
priv->iface = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"Interface");
"Interface",
NULL);
}
return priv->iface;
......@@ -792,7 +793,8 @@ nm_device_get_ip_iface (NMDevice *device)
if (!priv->ip_iface) {
priv->ip_iface = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"IpInterface");
"IpInterface",
NULL);
}
return priv->ip_iface;
......@@ -819,7 +821,8 @@ nm_device_get_udi (NMDevice *device)
if (!priv->udi) {
priv->udi = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"Udi");
"Udi",
NULL);
}
return priv->udi;
......@@ -845,7 +848,8 @@ nm_device_get_driver (NMDevice *device)
if (!priv->driver) {
priv->driver = _nm_object_get_string_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"Driver");
"Driver",
NULL);
}
return priv->driver;
......@@ -870,7 +874,8 @@ nm_device_get_capabilities (NMDevice *device)
if (!priv->capabilities) {
priv->capabilities = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"Capabilities");
"Capabilities",
NULL);
}
return priv->capabilities;
......@@ -895,7 +900,8 @@ nm_device_get_managed (NMDevice *device)
if (!priv->managed) {
priv->managed = _nm_object_get_boolean_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"Managed");
"Managed",
NULL);
}
return priv->managed;
......@@ -922,7 +928,8 @@ nm_device_get_firmware_missing (NMDevice *device)
if (!priv->firmware_missing) {
priv->firmware_missing = _nm_object_get_boolean_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"FirmwareMissing");
"FirmwareMissing",
NULL);
}
return priv->firmware_missing;
......@@ -951,7 +958,7 @@ nm_device_get_ip4_config (NMDevice *device)
if (priv->null_ip4_config)
return NULL;
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Ip4Config");
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Ip4Config", NULL);
if (path) {
g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
g_value_take_boxed (&value, path);
......@@ -986,7 +993,7 @@ nm_device_get_dhcp4_config (NMDevice *device)
if (priv->null_dhcp4_config)
return NULL;
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Dhcp4Config");
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Dhcp4Config", NULL);
if (path) {
g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
g_value_take_boxed (&value, path);
......@@ -1020,7 +1027,7 @@ nm_device_get_ip6_config (NMDevice *device)
if (priv->null_ip6_config)
return NULL;
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Ip6Config");
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Ip6Config", NULL);
if (path) {
g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
g_value_take_boxed (&value, path);
......@@ -1055,7 +1062,7 @@ nm_device_get_dhcp6_config (NMDevice *device)
if (priv->null_dhcp6_config)
return NULL;
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Dhcp6Config");
path = _nm_object_get_object_path_property (NM_OBJECT (device), NM_DBUS_INTERFACE_DEVICE, "Dhcp6Config", NULL);
if (path) {
g_value_init (&value, DBUS_TYPE_G_OBJECT_PATH);
g_value_take_boxed (&value, path);
......@@ -1085,7 +1092,8 @@ nm_device_get_state (NMDevice *device)
if (priv->state == NM_DEVICE_STATE_UNKNOWN) {
priv->state = _nm_object_get_uint_property (NM_OBJECT (device),
NM_DBUS_INTERFACE_DEVICE,
"State");
"State",
NULL);
}
return priv->state;
......
......@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
* Copyright (C) 2008 - 2010 Red Hat, Inc.
* Copyright (C) 2008 - 2011 Red Hat, Inc.
* Copyright (C) 2008 Novell, Inc.
*/
......@@ -218,7 +218,8 @@ nm_dhcp4_config_get_options (NMDHCP4Config *config)
if (!_nm_object_get_property (NM_OBJECT (config),
NM_DBUS_INTERFACE_DHCP4_CONFIG,
"Options",
&value))
&value,
NULL))
goto out;
demarshal_dhcp4_options (NM_OBJECT (config), NULL, &value, &priv->options);
......
......@@ -17,7 +17,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.