aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-modem-hso.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2009-12-07 22:04:28 -0800
committerDan Williams <dcbw@redhat.com>2009-12-07 22:04:28 -0800
commitdd057d28e4ab3812eebd41a7df1c2f80d90d8600 (patch)
tree46fa937720de3305ccc093f4741f0a25680fcba0 /plugins/mm-modem-hso.c
parentf715e0d498930409d97a8097b37731aadbc11a72 (diff)
parenta9e0624426632a38c2d208e7a28fac3bca51d857 (diff)
Merge commit 'origin/states'
Diffstat (limited to 'plugins/mm-modem-hso.c')
-rw-r--r--plugins/mm-modem-hso.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/plugins/mm-modem-hso.c b/plugins/mm-modem-hso.c
index a2e3b408..f1295e24 100644
--- a/plugins/mm-modem-hso.c
+++ b/plugins/mm-modem-hso.c
@@ -288,33 +288,30 @@ mm_hso_modem_authenticate (MMModemHso *self,
/*****************************************************************************/
static void
-generic_done (MMModem *modem, GError *error, gpointer user_data)
+enable_done (MMModem *modem, GError *error, gpointer user_data)
{
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
- if (error)
- info->error = g_error_copy (error);
- mm_callback_info_schedule (info);
+ mm_generic_gsm_enable_complete (MM_GENERIC_GSM (modem), error, info);
}
static void
parent_enable_done (MMModem *modem, GError *error, gpointer user_data)
{
MMCallbackInfo *info = (MMCallbackInfo *) user_data;
+ MMGenericGsm *self = MM_GENERIC_GSM (modem);
if (error) {
- info->error = g_error_copy (error);
- mm_callback_info_schedule (info);
- } else {
- /* HSO needs manual PIN checking */
- mm_generic_gsm_check_pin (MM_GENERIC_GSM (modem), generic_done, info);
+ mm_generic_gsm_enable_complete (self, error, info);
+ return;
}
+
+ /* HSO needs manual PIN checking */
+ mm_generic_gsm_check_pin (self, enable_done, info);
}
static void
-enable (MMModem *modem,
- MMModemFn callback,
- gpointer user_data)
+enable (MMModem *modem, MMModemFn callback, gpointer user_data)
{
MMModem *parent_modem_iface;
MMCallbackInfo *info;
@@ -325,6 +322,16 @@ enable (MMModem *modem,
}
static void
+parent_disable_done (MMModem *modem, GError *error, gpointer user_data)
+{
+ MMCallbackInfo *info = (MMCallbackInfo *) user_data;
+
+ if (error)
+ info->error = g_error_copy (error);
+ mm_callback_info_schedule (info);
+}
+
+static void
disable_done (MMModem *modem,
GError *error,
gpointer user_data)
@@ -334,7 +341,7 @@ disable_done (MMModem *modem,
/* Do the normal disable stuff */
parent_modem_iface = g_type_interface_peek_parent (MM_MODEM_GET_INTERFACE (info->modem));
- parent_modem_iface->disable (info->modem, generic_done, info);
+ parent_modem_iface->disable (info->modem, parent_disable_done, info);
}
static void