From 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Tue, 20 Dec 2016 20:06:37 +0800 Subject: Imported Upstream version 1.4.4 --- src/devices/adsl/nm-atm-manager.c | 14 +++++++------- src/devices/adsl/nm-device-adsl.c | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src/devices/adsl') diff --git a/src/devices/adsl/nm-atm-manager.c b/src/devices/adsl/nm-atm-manager.c index 67085752..40c782fd 100644 --- a/src/devices/adsl/nm-atm-manager.c +++ b/src/devices/adsl/nm-atm-manager.c @@ -68,7 +68,7 @@ dev_get_attrs (GUdevDevice *udev_device, path = g_udev_device_get_sysfs_path (udev_device); if (!path) { - nm_log_warn (LOGD_HW, "couldn't determine device path; ignoring..."); + nm_log_warn (LOGD_PLATFORM, "couldn't determine device path; ignoring..."); return FALSE; } @@ -110,11 +110,11 @@ adsl_add (NMAtmManager *self, GUdevDevice *udev_device) ifname = g_udev_device_get_name (udev_device); if (!ifname) { - nm_log_warn (LOGD_HW, "failed to get device's interface name"); + nm_log_warn (LOGD_PLATFORM, "failed to get device's interface name"); return; } - nm_log_dbg (LOGD_HW, "(%s): found ATM device", ifname); + nm_log_dbg (LOGD_PLATFORM, "(%s): found ATM device", ifname); atm_index_path = g_strdup_printf ("/sys/class/atm/%s/atmindex", NM_ASSERT_VALID_PATH_COMPONENT (ifname)); @@ -123,12 +123,12 @@ adsl_add (NMAtmManager *self, GUdevDevice *udev_device) 10, 0, G_MAXINT, -1); if (atm_index < 0) { - nm_log_warn (LOGD_HW, "(%s): failed to get ATM index", ifname); + nm_log_warn (LOGD_PLATFORM, "(%s): failed to get ATM index", ifname); return; } if (!dev_get_attrs (udev_device, &sysfs_path, &driver)) { - nm_log_warn (LOGD_HW, "(%s): failed to get ATM attributes", ifname); + nm_log_warn (LOGD_PLATFORM, "(%s): failed to get ATM attributes", ifname); return; } @@ -153,7 +153,7 @@ adsl_remove (NMAtmManager *self, GUdevDevice *udev_device) const char *iface = g_udev_device_get_name (udev_device); GSList *iter; - nm_log_dbg (LOGD_HW, "(%s): removing ATM device", iface); + nm_log_dbg (LOGD_PLATFORM, "(%s): removing ATM device", iface); for (iter = priv->devices; iter; iter = iter->next) { NMDevice *device = iter->data; @@ -210,7 +210,7 @@ handle_uevent (GUdevClient *client, ifindex = g_udev_device_get_property (device, "IFINDEX"); seqnum = g_udev_device_get_seqnum (device); - nm_log_dbg (LOGD_HW, "UDEV event: action '%s' subsys '%s' device '%s' (%s); seqnum=%" G_GUINT64_FORMAT, + nm_log_dbg (LOGD_PLATFORM, "UDEV event: action '%s' subsys '%s' device '%s' (%s); seqnum=%" G_GUINT64_FORMAT, action, subsys, g_udev_device_get_name (device), ifindex ? ifindex : "unknown", seqnum); if (!strcmp (action, "add")) diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index ebb7a319..77c6e119 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -154,7 +154,7 @@ br2684_assign_vcc (NMDeviceAdsl *self, NMSettingAdsl *s_adsl) g_return_val_if_fail (priv->brfd == -1, FALSE); g_return_val_if_fail (priv->nas_ifname != NULL, FALSE); - priv->brfd = socket (PF_ATMPVC, SOCK_DGRAM, ATM_AAL5); + priv->brfd = socket (PF_ATMPVC, SOCK_DGRAM | SOCK_CLOEXEC, ATM_AAL5); if (priv->brfd < 0) { errsv = errno; _LOGE (LOGD_ADSL, "failed to open ATM control socket (%d)", errsv); @@ -338,7 +338,7 @@ br2684_create_iface (NMDeviceAdsl *self, nm_clear_g_source (&priv->nas_update_id); } - fd = socket (PF_ATMPVC, SOCK_DGRAM, ATM_AAL5); + fd = socket (PF_ATMPVC, SOCK_DGRAM | SOCK_CLOEXEC, ATM_AAL5); if (fd < 0) { errsv = errno; _LOGE (LOGD_ADSL, "failed to open ATM control socket (%d)", errsv); @@ -472,7 +472,7 @@ act_stage3_ip4_config_start (NMDevice *device, } priv->ppp_manager = nm_ppp_manager_new (ppp_iface); - if (nm_ppp_manager_start (priv->ppp_manager, req, nm_setting_adsl_get_username (s_adsl), 30, &err)) { + if (nm_ppp_manager_start (priv->ppp_manager, req, nm_setting_adsl_get_username (s_adsl), 30, 0, &err)) { g_signal_connect (priv->ppp_manager, NM_PPP_MANAGER_STATE_CHANGED, G_CALLBACK (ppp_state_changed), self); -- cgit 1.3.0-6-gf8a5