summaryrefslogtreecommitdiff
path: root/src/devices/wwan
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-01-20 21:20:32 +0100
committerThomas Haller <thaller@redhat.com>2015-02-24 11:49:04 +0100
commite524be2c345431c53bc34af6e114c73def1d5891 (patch)
treec0728fc62ac0c962b5f555e18d0a311ead20463e /src/devices/wwan
parent37ebeccaa7247664d69cdfbdb20861bf78f8d72d (diff)
downloadNetworkManager-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.c11
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;
}