summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-12-09 18:14:13 +0100
committerThomas Haller <thaller@redhat.com>2015-12-09 18:16:50 +0100
commit51e6c867f53da416f09c9c15d8e26a426e75058c (patch)
treec519298fedcc38feed53d91a57f61fda2f1b64de
parente50be5688df07a49c32a5777ca651fd98976d7a1 (diff)
downloadNetworkManager-dcbw/adsl-fixes-bgo759001.tar.gz
fixup! adsl: look up ATM index before constructiondcbw/adsl-fixes-bgo759001
-rw-r--r--src/devices/adsl/nm-device-adsl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c
index 719e8ca8c9..37f232880d 100644
--- a/src/devices/adsl/nm-device-adsl.c
+++ b/src/devices/adsl/nm-device-adsl.c
@@ -582,6 +582,8 @@ constructed (GObject *object)
priv->carrier_poll_id = g_timeout_add_seconds (5, carrier_update_cb, self);
_LOGD (LOGD_ADSL, "ATM device index %d", priv->atm_index);
+
+ g_return_if_fail (priv->atm_index >= 0);
}
static void
@@ -614,6 +616,7 @@ set_property (GObject *object, guint prop_id,
{
switch (prop_id) {
case PROP_ATM_INDEX:
+ /* construct only */
NM_DEVICE_ADSL_GET_PRIVATE (object)->atm_index = g_value_get_int (value);
break;
default: