summaryrefslogtreecommitdiff
path: root/src/nm-device-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-10-24 19:27:02 +0200
committerDan Williams <dcbw@redhat.com>2012-10-30 18:24:25 -0500
commit24b6fc9e624615ca95cc26008775075ae91ef782 (patch)
tree8cf38ab4c484c7b6447a70eb88c34c70874e19c1 /src/nm-device-modem.c
parentf98ef0fdc4c15e73effb38b5f6915357041e3126 (diff)
downloadNetworkManager-24b6fc9e624615ca95cc26008775075ae91ef782.tar.gz
modem-manager: switch the `state' property from `NMModem' into just `connected'
We don't want to depend in the `NMModem' interface on an enumeration which is very specific to the old ModemManager interface, so we'll just skip exposing it and instead we'll just give a new boolean property which tells whether the modem is connected or not (which was at the end the whole purpose of the `state' property).
Diffstat (limited to 'src/nm-device-modem.c')
-rw-r--r--src/nm-device-modem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nm-device-modem.c b/src/nm-device-modem.c
index 2ceed1fdd8..c27934fc1b 100644
--- a/src/nm-device-modem.c
+++ b/src/nm-device-modem.c
@@ -167,13 +167,13 @@ modem_enabled_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
}
static void
-modem_state_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
+modem_connected_cb (NMModem *modem, GParamSpec *pspec, gpointer user_data)
{
NMDeviceModem *self = NM_DEVICE_MODEM (user_data);
NMDeviceModemPrivate *priv = NM_DEVICE_MODEM_GET_PRIVATE (self);
if ( nm_device_get_state (NM_DEVICE (self)) == NM_DEVICE_STATE_ACTIVATED
- && nm_modem_get_state (priv->modem) != NM_MODEM_STATE_CONNECTED) {
+ && !nm_modem_get_mm_connected (priv->modem)) {
/* Fail the device if the modem disconnects unexpectedly */
nm_device_state_changed (NM_DEVICE (self), NM_DEVICE_STATE_FAILED, NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER);
}
@@ -390,7 +390,7 @@ set_modem (NMDeviceModem *self, NMModem *modem)
g_signal_connect (modem, NM_MODEM_AUTH_REQUESTED, G_CALLBACK (modem_auth_requested), self);
g_signal_connect (modem, NM_MODEM_AUTH_RESULT, G_CALLBACK (modem_auth_result), self);
g_signal_connect (modem, "notify::" NM_MODEM_ENABLED, G_CALLBACK (modem_enabled_cb), self);
- g_signal_connect (modem, "notify::" NM_MODEM_STATE, G_CALLBACK (modem_state_cb), self);
+ g_signal_connect (modem, "notify::" NM_MODEM_CONNECTED, G_CALLBACK (modem_connected_cb), self);
}
static void