diff options
author | Thomas Haller <thaller@redhat.com> | 2015-01-20 21:20:32 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-02-24 11:49:04 +0100 |
commit | e524be2c345431c53bc34af6e114c73def1d5891 (patch) | |
tree | c0728fc62ac0c962b5f555e18d0a311ead20463e /src/devices/wwan | |
parent | 37ebeccaa7247664d69cdfbdb20861bf78f8d72d (diff) | |
download | NetworkManager-e524be2c345431c53bc34af6e114c73def1d5891.tar.gz |
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.
Diffstat (limited to 'src/devices/wwan')
-rw-r--r-- | src/devices/wwan/nm-device-modem.c | 11 |
1 files changed, 3 insertions, 8 deletions
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; } |