diff options
| author | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2015-01-22 00:29:39 +0100 |
| commit | 2c032d8f1c6292c1338a615e6ec40252889ba85c (patch) | |
| tree | 1f77182220b2b0264288ba4a476ab47e5bc48716 /src/devices/adsl | |
| parent | 33491bc4279481db8ae47213e34a6d695a0e8830 (diff) | |
Imported Upstream version 1.0.0 upstream/1.0.0
Diffstat (limited to 'src/devices/adsl')
| -rw-r--r-- | src/devices/adsl/Makefile.am | 11 | ||||
| -rw-r--r-- | src/devices/adsl/Makefile.in | 17 | ||||
| -rw-r--r-- | src/devices/adsl/exports.ver | 1 | ||||
| -rw-r--r-- | src/devices/adsl/nm-atm-manager.c | 34 | ||||
| -rw-r--r-- | src/devices/adsl/nm-atm-manager.h | 6 | ||||
| -rw-r--r-- | src/devices/adsl/nm-device-adsl.c | 129 | ||||
| -rw-r--r-- | src/devices/adsl/nm-device-adsl.h | 4 |
7 files changed, 84 insertions, 118 deletions
diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am index 0430f47d..07a8f9ee 100644 --- a/src/devices/adsl/Makefile.am +++ b/src/devices/adsl/Makefile.am @@ -5,20 +5,15 @@ include $(GLIB_MAKEFILE) AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ - -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ - -I${top_srcdir}/src/ppp-manager \ - -I${top_builddir}/include \ -I${top_srcdir}/include \ - -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-util \ + -I${top_builddir}/libnm-core \ + -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \ + -DNETWORKMANAGER_COMPILATION \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ $(DBUS_CFLAGS) \ - $(POLKIT_CFLAGS) \ - $(LIBNL_CFLAGS) \ $(GUDEV_CFLAGS) GLIB_GENERATED = nm-adsl-enum-types.h nm-adsl-enum-types.c diff --git a/src/devices/adsl/Makefile.in b/src/devices/adsl/Makefile.in index 708a45d2..7942c559 100644 --- a/src/devices/adsl/Makefile.in +++ b/src/devices/adsl/Makefile.in @@ -217,6 +217,8 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BLUEZ5_CFLAGS = @BLUEZ5_CFLAGS@ +BLUEZ5_LIBS = @BLUEZ5_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ @@ -340,6 +342,7 @@ NEWT_CFLAGS = @NEWT_CFLAGS@ NEWT_LIBS = @NEWT_LIBS@ NM = @NM@ NMEDIT = @NMEDIT@ +NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT = @NM_CONFIG_DEFAULT_AUTH_POLKIT_TEXT@ NM_MAJOR_VERSION = @NM_MAJOR_VERSION@ NM_MICRO_VERSION = @NM_MICRO_VERSION@ NM_MINOR_VERSION = @NM_MINOR_VERSION@ @@ -359,6 +362,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ @@ -385,7 +389,7 @@ SYSTEMD_INHIBIT_LIBS = @SYSTEMD_INHIBIT_LIBS@ SYSTEMD_LOGIN_CFLAGS = @SYSTEMD_LOGIN_CFLAGS@ SYSTEMD_LOGIN_LIBS = @SYSTEMD_LOGIN_LIBS@ SYSTEM_CA_PATH = @SYSTEM_CA_PATH@ -UDEV_BASE_DIR = @UDEV_BASE_DIR@ +UDEV_DIR = @UDEV_DIR@ USE_NLS = @USE_NLS@ UUID_CFLAGS = @UUID_CFLAGS@ UUID_LIBS = @UUID_LIBS@ @@ -467,20 +471,15 @@ with_valgrind = @with_valgrind@ AM_CPPFLAGS = \ -I${top_srcdir}/src \ -I${top_builddir}/src \ - -I${top_srcdir}/src/logging \ -I${top_srcdir}/src/devices \ - -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ - -I${top_srcdir}/src/ppp-manager \ - -I${top_builddir}/include \ -I${top_srcdir}/include \ - -I${top_builddir}/libnm-util \ - -I${top_srcdir}/libnm-util \ + -I${top_builddir}/libnm-core \ + -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \ + -DNETWORKMANAGER_COMPILATION \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ $(DBUS_CFLAGS) \ - $(POLKIT_CFLAGS) \ - $(LIBNL_CFLAGS) \ $(GUDEV_CFLAGS) GLIB_GENERATED = nm-adsl-enum-types.h nm-adsl-enum-types.c diff --git a/src/devices/adsl/exports.ver b/src/devices/adsl/exports.ver index d2c45124..24cd848c 100644 --- a/src/devices/adsl/exports.ver +++ b/src/devices/adsl/exports.ver @@ -1,7 +1,6 @@ { global: nm_device_factory_create; - nm_device_factory_get_device_type; local: *; }; diff --git a/src/devices/adsl/nm-atm-manager.c b/src/devices/adsl/nm-atm-manager.c index e8db3596..6f34c02b 100644 --- a/src/devices/adsl/nm-atm-manager.c +++ b/src/devices/adsl/nm-atm-manager.c @@ -18,7 +18,7 @@ * Copyright (C) 2009 - 2013 Red Hat, Inc. */ -#include <config.h> +#include "config.h" #include <string.h> #include <gudev/gudev.h> @@ -28,11 +28,11 @@ #include "nm-device-adsl.h" #include "nm-device-factory.h" #include "nm-logging.h" +#include "nm-glib-compat.h" typedef struct { GUdevClient *client; GSList *devices; - guint start_id; } NMAtmManagerPrivate; #define NM_ATM_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_ATM_MANAGER, NMAtmManagerPrivate)) @@ -46,20 +46,12 @@ G_DEFINE_TYPE_EXTENDED (NMAtmManager, nm_atm_manager, G_TYPE_OBJECT, 0, /**************************************************************************/ -#define PLUGIN_TYPE NM_DEVICE_TYPE_ADSL - G_MODULE_EXPORT NMDeviceFactory * nm_device_factory_create (GError **error) { return (NMDeviceFactory *) g_object_new (NM_TYPE_ATM_MANAGER, NULL); } -G_MODULE_EXPORT NMDeviceType -nm_device_factory_get_device_type (void) -{ - return PLUGIN_TYPE; -} - /************************************************************************/ static gboolean @@ -163,9 +155,10 @@ adsl_remove (NMAtmManager *self, GUdevDevice *udev_device) } } -static gboolean -query_devices (NMAtmManager *self) +static void +start (NMDeviceFactory *factory) { + NMAtmManager *self = NM_ATM_MANAGER (factory); NMAtmManagerPrivate *priv = NM_ATM_MANAGER_GET_PRIVATE (self); GUdevEnumerator *enumerator; GList *devices, *iter; @@ -180,8 +173,6 @@ query_devices (NMAtmManager *self) } g_list_free (devices); g_object_unref (enumerator); - - return G_SOURCE_REMOVE; } static void @@ -212,6 +203,12 @@ handle_uevent (GUdevClient *client, adsl_remove (self, device); } +static NMDeviceType +get_device_type (NMDeviceFactory *factory) +{ + return NM_DEVICE_TYPE_ADSL; +} + /*********************************************************************/ static void @@ -222,13 +219,13 @@ nm_atm_manager_init (NMAtmManager *self) priv->client = g_udev_client_new (subsys); g_signal_connect (priv->client, "uevent", G_CALLBACK (handle_uevent), self); - - priv->start_id = g_idle_add ((GSourceFunc) query_devices, self); } static void device_factory_interface_init (NMDeviceFactory *factory_iface) { + factory_iface->get_device_type = get_device_type; + factory_iface->start = start; } static void @@ -242,11 +239,6 @@ dispose (GObject *object) g_signal_handlers_disconnect_by_func (priv->client, handle_uevent, self); g_clear_object (&priv->client); - if (priv->start_id) { - g_source_remove (priv->start_id); - priv->start_id = 0; - } - for (iter = priv->devices; iter; iter = iter->next) g_object_weak_unref (G_OBJECT (iter->data), device_destroyed, self); g_clear_pointer (&priv->devices, g_slist_free); diff --git a/src/devices/adsl/nm-atm-manager.h b/src/devices/adsl/nm-atm-manager.h index 00525220..e4ec3e6a 100644 --- a/src/devices/adsl/nm-atm-manager.h +++ b/src/devices/adsl/nm-atm-manager.h @@ -19,8 +19,8 @@ * Copyright (C) 2007 - 2014 Red Hat, Inc. */ -#ifndef NM_ATM_MANAGER_H -#define NM_ATM_MANAGER_H +#ifndef __NETWORKMANAGER_ATM_MANAGER_H__ +#define __NETWORKMANAGER_ATM_MANAGER_H__ #include <glib.h> #include <glib-object.h> @@ -38,5 +38,5 @@ typedef struct { GObjectClass parent; } NMAtmManagerClass; -#endif /* NM_ATM_MANAGER_H */ +#endif /* __NETWORKMANAGER_ATM_MANAGER_H__ */ diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index 0c35bb7a..e664ff48 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -18,7 +18,7 @@ * Pantelis Koukousoulas <pktoss@gmail.com> */ -#include <config.h> +#include "config.h" #include <sys/socket.h> #include <linux/atmdev.h> @@ -44,9 +44,13 @@ #include "ppp-manager/nm-ppp-manager.h" #include "nm-setting-adsl.h" +#include "nm-utils.h" #include "nm-device-adsl-glue.h" +#include "nm-device-logging.h" +_LOG_DECLARE_SELF (NMDeviceAdsl); + G_DEFINE_TYPE (NMDeviceAdsl, nm_device_adsl, NM_TYPE_DEVICE) #define NM_DEVICE_ADSL_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_ADSL, NMDeviceAdslPrivate)) @@ -72,7 +76,9 @@ typedef struct { static guint32 get_generic_capabilities (NMDevice *dev) { - return (NM_DEVICE_CAP_CARRIER_DETECT | NM_DEVICE_CAP_NONSTANDARD_CARRIER); + return ( NM_DEVICE_CAP_CARRIER_DETECT + | NM_DEVICE_CAP_NONSTANDARD_CARRIER + | NM_DEVICE_CAP_IS_NON_KERNEL); } static gboolean @@ -119,7 +125,8 @@ complete_connection (NMDevice *device, nm_utils_complete_generic (connection, NM_SETTING_ADSL_SETTING_NAME, existing_connections, - _("ADSL connection %d"), + NULL, + _("ADSL connection"), NULL, FALSE); /* No IPv6 yet by default */ @@ -142,18 +149,14 @@ set_nas_iface (NMDeviceAdsl *self, int idx, const char *name) g_warn_if_fail (priv->nas_ifname == NULL); priv->nas_ifname = g_strdup (name); - - /* Update NAS interface's MAC address */ - nm_device_update_hw_address (NM_DEVICE (self)); } static gboolean br2684_create_iface (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) { NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); - const char *iface = nm_device_get_iface (NM_DEVICE (self)); struct atm_newif_br2684 ni; - int err, fd; + int err, fd, errsv; gboolean success = FALSE; guint num = 0; @@ -161,8 +164,8 @@ br2684_create_iface (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) fd = socket (PF_ATMPVC, SOCK_DGRAM, ATM_AAL5); if (fd < 0) { - nm_log_err (LOGD_ADSL, "(%s): failed to open ATM control socket (%d)", - iface, errno); + errsv = errno; + _LOGE (LOGD_ADSL, "failed to open ATM control socket (%d)", errsv); return FALSE; } @@ -183,17 +186,19 @@ br2684_create_iface (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) err = ioctl (fd, ATM_NEWBACKENDIF, &ni); if (err == 0) { set_nas_iface (self, -1, ni.ifname); - nm_log_info (LOGD_ADSL, "(%s): using NAS interface %s (%d)", - iface, priv->nas_ifname, priv->nas_ifindex); + _LOGI (LOGD_ADSL, "using NAS interface %s (%d)", + priv->nas_ifname, priv->nas_ifindex); success = TRUE; break; - } else if (errno == -EEXIST) { - /* Try again */ - num++; } else { - nm_log_warn (LOGD_ADSL, "(%s): failed to create br2684 interface (%d)", - iface, errno); - break; + errsv = errno; + if (errsv == -EEXIST) { + /* Try again */ + num++; + } else { + _LOGW (LOGD_ADSL, "failed to create br2684 interface (%d)", errsv); + break; + } } } @@ -205,11 +210,10 @@ static gboolean br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) { NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); - const char *iface = nm_device_get_iface (NM_DEVICE (self)); struct sockaddr_atmpvc addr; struct atm_backend_br2684 be; struct atm_qos qos; - int err, bufsize = 8192; + int errsv, err, bufsize = 8192; const char *encapsulation; gboolean is_llc; @@ -218,15 +222,15 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) priv->brfd = socket (PF_ATMPVC, SOCK_DGRAM, ATM_AAL5); if (priv->brfd < 0) { - nm_log_err (LOGD_ADSL, "(%s): failed to open ATM control socket (%d)", - iface, errno); + errsv = errno; + _LOGE (LOGD_ADSL, "failed to open ATM control socket (%d)", errsv); return FALSE; } err = setsockopt (priv->brfd, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof (bufsize)); if (err != 0) { - nm_log_err (LOGD_ADSL, "(%s): failed to set SNDBUF option (%d)", - iface, errno); + errsv = errno; + _LOGE (LOGD_ADSL, "failed to set SNDBUF option (%d)", errsv); goto error; } @@ -240,8 +244,8 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) err = setsockopt (priv->brfd, SOL_ATM, SO_ATMQOS, &qos, sizeof (qos)); if (err != 0) { - nm_log_err (LOGD_ADSL, "(%s): failed to set QoS (%d)", - iface, errno); + errsv = errno; + _LOGE (LOGD_ADSL, "failed to set QoS (%d)", errsv); goto error; } @@ -254,15 +258,14 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) addr.sap_addr.vpi = (guint16) nm_setting_adsl_get_vpi (s_adsl); addr.sap_addr.vci = (int) nm_setting_adsl_get_vci (s_adsl); - nm_log_dbg (LOGD_ADSL, "(%s): assigning address %d.%d.%d encapsulation %s", - nm_device_get_iface (NM_DEVICE (self)), - priv->atm_index, addr.sap_addr.vpi, addr.sap_addr.vci, - encapsulation); + _LOGD (LOGD_ADSL, "assigning address %d.%d.%d encapsulation %s", + priv->atm_index, addr.sap_addr.vpi, addr.sap_addr.vci, + encapsulation ? encapsulation : "(none)"); err = connect (priv->brfd, (struct sockaddr*) &addr, sizeof (addr)); if (err != 0) { - nm_log_err (LOGD_ADSL, "(%s): failed to set VPI/VCI (%d)", - iface, errno); + errsv = errno; + _LOGE (LOGD_ADSL, "failed to set VPI/VCI (%d)", errsv); goto error; } @@ -278,8 +281,8 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) be.encaps = is_llc ? BR2684_ENCAPS_LLC : BR2684_ENCAPS_VC; err = ioctl (priv->brfd, ATM_SETBACKEND, &be); if (err != 0) { - nm_log_err (LOGD_ADSL, "(%s): failed to attach VCC (%d)", - iface, errno); + errsv = errno; + _LOGE (LOGD_ADSL, "failed to attach VCC (%d)", errsv); goto error; } @@ -292,18 +295,17 @@ error: } static void -link_changed_cb (NMPlatform *platform, int ifindex, NMPlatformLink *info, NMPlatformSignalChangeType change_type, NMPlatformReason reason, NMDeviceAdsl *device_adsl) +link_changed_cb (NMPlatform *platform, int ifindex, NMPlatformLink *info, NMPlatformSignalChangeType change_type, NMPlatformReason reason, NMDeviceAdsl *self) { if (change_type == NM_PLATFORM_SIGNAL_REMOVED) { - NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (device_adsl); - NMDevice *device = NM_DEVICE (device_adsl); + NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (self); + NMDevice *device = NM_DEVICE (self); /* This only gets called for PPPoE connections and "nas" interfaces */ if (priv->nas_ifindex >= 0 && ifindex == priv->nas_ifindex) { /* NAS device went away for some reason; kill the connection */ - nm_log_dbg (LOGD_ADSL, "(%s): NAS interface disappeared", - nm_device_get_iface (device)); + _LOGD (LOGD_ADSL, "NAS interface disappeared"); nm_device_state_changed (device, NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_BR2684_FAILED); @@ -326,8 +328,7 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_reason) g_assert (s_adsl); protocol = nm_setting_adsl_get_protocol (s_adsl); - nm_log_dbg (LOGD_ADSL, "(%s): using ADSL protocol '%s'", - nm_device_get_iface (device), protocol); + _LOGD (LOGD_ADSL, "using ADSL protocol '%s'", protocol); if (g_strcmp0 (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOE) == 0) { @@ -348,7 +349,7 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_reason) G_CALLBACK (link_changed_cb), self); - nm_log_dbg (LOGD_ADSL, "(%s): ATM setup successful", nm_device_get_iface (device)); + _LOGD (LOGD_ADSL, "ATM setup successful"); /* otherwise we're good for stage3 */ nm_platform_link_set_up (priv->nas_ifindex); @@ -357,10 +358,8 @@ act_stage2_config (NMDevice *device, NMDeviceStateReason *out_reason) } else if (g_strcmp0 (protocol, NM_SETTING_ADSL_PROTOCOL_PPPOA) == 0) { /* PPPoA doesn't need anything special */ ret = NM_ACT_STAGE_RETURN_SUCCESS; - } else { - nm_log_warn (LOGD_ADSL, "(%s): unhandled ADSL protocol '%s'", - nm_device_get_iface (device), protocol); - } + } else + _LOGW (LOGD_ADSL, "unhandled ADSL protocol '%s'", protocol); done: return ret; @@ -410,7 +409,6 @@ act_stage3_ip4_config_start (NMDevice *device, NMActRequest *req; GError *err = NULL; NMActStageReturn ret = NM_ACT_STAGE_RETURN_FAILURE; - const char *iface = nm_device_get_iface (device); const char *ppp_iface; req = nm_device_get_act_request (device); @@ -427,11 +425,10 @@ act_stage3_ip4_config_start (NMDevice *device, g_assert (priv->nas_ifname); ppp_iface = priv->nas_ifname; - nm_log_dbg (LOGD_ADSL, "(%s): starting PPPoE on NAS interface %s", - iface, priv->nas_ifname); + _LOGD (LOGD_ADSL, "starting PPPoE on NAS interface %s", priv->nas_ifname); } else { - ppp_iface = iface; - nm_log_dbg (LOGD_ADSL, "(%s): starting PPPoA", iface); + ppp_iface = nm_device_get_iface (device); + _LOGD (LOGD_ADSL, "starting PPPoA"); } priv->ppp_manager = nm_ppp_manager_new (ppp_iface); @@ -444,7 +441,7 @@ act_stage3_ip4_config_start (NMDevice *device, self); ret = NM_ACT_STAGE_RETURN_POSTPONE; } else { - nm_log_warn (LOGD_ADSL, "(%s): PPP failed to start: %s", iface, err->message); + _LOGW (LOGD_ADSL, "PPP failed to start: %s", err->message); g_error_free (err); g_object_unref (priv->ppp_manager); @@ -482,33 +479,19 @@ deactivate (NMDevice *device) priv->nas_ifindex = -1; g_free (priv->nas_ifname); priv->nas_ifname = NULL; - - /* Poke NMDevice to notice that our hw_address is no longer valid */ - nm_device_update_hw_address (NM_DEVICE (self)); } /**************************************************************/ -static guint -get_hw_address_length (NMDevice *device, gboolean *out_permanent) -{ - NMDeviceAdslPrivate *priv = NM_DEVICE_ADSL_GET_PRIVATE (device); - - return priv->nas_ifname ? ETH_ALEN : 0; -} - static gboolean carrier_update_cb (gpointer user_data) { NMDeviceAdsl *self = NM_DEVICE_ADSL (user_data); int carrier; char *path; - const char *iface; - - iface = nm_device_get_iface (NM_DEVICE (self)); path = g_strdup_printf ("/sys/class/atm/%s/carrier", - ASSERT_VALID_PATH_COMPONENT (iface)); + ASSERT_VALID_PATH_COMPONENT (nm_device_get_iface (NM_DEVICE (self)))); carrier = (int) nm_platform_sysctl_get_int_checked (path, 10, 0, 1, -1); g_free (path); @@ -555,6 +538,7 @@ constructor (GType type, GObjectConstructParam *construct_params) { GObject *object; + NMDeviceAdsl *self; NMDeviceAdslPrivate *priv; object = G_OBJECT_CLASS (nm_device_adsl_parent_class)->constructor (type, @@ -563,18 +547,16 @@ constructor (GType type, if (!object) return NULL; + self = NM_DEVICE_ADSL (object); priv = NM_DEVICE_ADSL_GET_PRIVATE (object); priv->atm_index = get_atm_index (nm_device_get_iface (NM_DEVICE (object))); if (priv->atm_index < 0) { - nm_log_err (LOGD_ADSL, "(%s): error reading ATM device index", - nm_device_get_iface (NM_DEVICE (object))); + _LOGE (LOGD_ADSL, "error reading ATM device index"); g_object_unref (object); return NULL; - } else { - nm_log_dbg (LOGD_ADSL, "(%s): ATM device index %d", - nm_device_get_iface (NM_DEVICE (object)), priv->atm_index); - } + } else + _LOGD (LOGD_ADSL, "ATM device index %d", priv->atm_index); /* Poll the carrier */ priv->carrier_poll_id = g_timeout_add_seconds (5, carrier_update_cb, object); @@ -629,7 +611,6 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) parent_class->check_connection_compatible = check_connection_compatible; parent_class->complete_connection = complete_connection; - parent_class->get_hw_address_length = get_hw_address_length; parent_class->act_stage2_config = act_stage2_config; parent_class->act_stage3_ip4_config_start = act_stage3_ip4_config_start; parent_class->deactivate = deactivate; diff --git a/src/devices/adsl/nm-device-adsl.h b/src/devices/adsl/nm-device-adsl.h index bbd0e63f..f21381c2 100644 --- a/src/devices/adsl/nm-device-adsl.h +++ b/src/devices/adsl/nm-device-adsl.h @@ -19,8 +19,8 @@ * Copyright (C) 2009 - 2011 Red Hat Inc. */ -#ifndef NM_DEVICE_ADSL_H -#define NM_DEVICE_ADSL_H +#ifndef __NETWORKMANAGER_DEVICE_ADSL_H__ +#define __NETWORKMANAGER_DEVICE_ADSL_H__ #include <glib-object.h> |