diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 76c450b4e9..e2ff77e4dd 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -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 diff --git a/src/nm-device.c b/src/nm-device.c index cf01003cac..6eaa94da41 100644 --- a/src/nm-device.c +++ b/src/nm-device.c @@ -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.