From e524be2c345431c53bc34af6e114c73def1d5891 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 20 Jan 2015 21:20:32 +0100 Subject: device: remove debug logging from is_available() Having logging statements in a simple getter (or is_*()) means you cannot call these functions without cluttering the log. Another approach would be to add an @out_reason argument, and callers who actually care log the reason. For now, just get rid of the messages. --- src/devices/wwan/nm-device-modem.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/devices/wwan') diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index 9fcfba6fd8..e4250bbb76 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -587,21 +587,16 @@ static gboolean is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags) { NMDeviceModem *self = NM_DEVICE_MODEM (device); - NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (device); + NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self); NMModemState modem_state; - if (!priv->rf_enabled) { - _LOGD (LOGD_MB, "not available because WWAN airplane mode is on"); + if (!priv->rf_enabled) return FALSE; - } g_assert (priv->modem); modem_state = nm_modem_get_state (priv->modem); - if (modem_state <= NM_MODEM_STATE_INITIALIZING) { - _LOGD (LOGD_MB, "not available because modem is not ready (%s)", - nm_modem_state_to_string (modem_state)); + if (modem_state <= NM_MODEM_STATE_INITIALIZING) return FALSE; - } return TRUE; } -- cgit v1.2.1