mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 02:20:12 +01:00
core: move failure logging to device superclass
This commit is contained in:
parent
3ed3485a2f
commit
c2e25dfedc
2 changed files with 6 additions and 8 deletions
|
|
@ -3164,7 +3164,6 @@ activation_failure_handler (NMDevice *dev)
|
|||
NMDeviceWifi *self = NM_DEVICE_WIFI (dev);
|
||||
NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self);
|
||||
NMAccessPoint *ap;
|
||||
const GByteArray * ssid;
|
||||
NMConnection *connection;
|
||||
|
||||
connection = nm_device_get_connection (dev);
|
||||
|
|
@ -3186,12 +3185,6 @@ activation_failure_handler (NMDevice *dev)
|
|||
g_object_unref (ap);
|
||||
}
|
||||
}
|
||||
|
||||
ssid = nm_ap_get_ssid (ap);
|
||||
nm_log_warn (LOGD_DEVICE | LOGD_WIFI,
|
||||
"Activation (%s) failed for access point (%s)",
|
||||
nm_device_get_iface (dev),
|
||||
ssid ? nm_utils_escape_ssid (ssid->data, ssid->len) : "(none)");
|
||||
}
|
||||
|
||||
static gboolean
|
||||
|
|
|
|||
|
|
@ -4454,6 +4454,7 @@ nm_device_state_changed (NMDevice *device,
|
|||
NMDeviceState old_state;
|
||||
NMActRequest *req;
|
||||
gboolean no_firmware = FALSE;
|
||||
NMConnection *connection;
|
||||
|
||||
g_return_if_fail (NM_IS_DEVICE (device));
|
||||
|
||||
|
|
@ -4554,7 +4555,11 @@ nm_device_state_changed (NMDevice *device,
|
|||
nm_utils_call_dispatcher ("up", nm_act_request_get_connection (req), device, NULL, NULL, NULL);
|
||||
break;
|
||||
case NM_DEVICE_STATE_FAILED:
|
||||
nm_log_warn (LOGD_DEVICE, "Activation (%s) failed.", nm_device_get_iface (device));
|
||||
connection = nm_act_request_get_connection (req);
|
||||
nm_log_warn (LOGD_DEVICE | LOGD_WIFI,
|
||||
"Activation (%s) failed for connection '%s'",
|
||||
nm_device_get_iface (device),
|
||||
nm_connection_get_id (connection));
|
||||
/* Schedule the transition to DISCONNECTED. The device can't transition
|
||||
* immediately because we can't change states again from the state
|
||||
* handler for a variety of reasons.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue