aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c32
-rw-r--r--plugins/ublox/mm-broadband-modem-ublox.c33
2 files changed, 53 insertions, 12 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index d4c0e830..8433895a 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -3039,15 +3039,19 @@ static const MMBaseModemAtCommand unsolicited_voice_disable_sequence[] = {
};
static void
-modem_voice_disable_unsolicited_events (MMIfaceModemVoice *self,
- GAsyncReadyCallback callback,
- gpointer user_data)
+parent_voice_disable_unsolicited_events_ready (MMIfaceModemVoice *self,
+ GAsyncResult *res,
+ GTask *task)
{
- GTask *task;
+ GError *error = NULL;
- task = g_task_new (self, NULL, callback, user_data);
+ if (!iface_modem_voice_parent->disable_unsolicited_events_finish (self, res, &error)) {
+ g_task_return_error (task, error);
+ g_object_unref (task);
+ return;
+ }
- /* No unsolicited events disabling in parent */
+ /* our own disable now */
mm_base_modem_at_sequence_full (
MM_BASE_MODEM (self),
@@ -3060,6 +3064,22 @@ modem_voice_disable_unsolicited_events (MMIfaceModemVoice *self,
task);
}
+static void
+modem_voice_disable_unsolicited_events (MMIfaceModemVoice *self,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
+{
+ GTask *task;
+
+ task = g_task_new (self, NULL, callback, user_data);
+
+ /* Chain up parent's disable */
+ iface_modem_voice_parent->disable_unsolicited_events (
+ self,
+ (GAsyncReadyCallback)parent_voice_disable_unsolicited_events_ready,
+ task);
+}
+
/*****************************************************************************/
/* Create call (Voice interface) */
diff --git a/plugins/ublox/mm-broadband-modem-ublox.c b/plugins/ublox/mm-broadband-modem-ublox.c
index fe1c319d..75e1a401 100644
--- a/plugins/ublox/mm-broadband-modem-ublox.c
+++ b/plugins/ublox/mm-broadband-modem-ublox.c
@@ -1005,6 +1005,23 @@ modem_voice_disable_unsolicited_events_finish (MMIfaceModemVoice *self,
}
static void
+parent_voice_disable_unsolicited_events_ready (MMIfaceModemVoice *self,
+ GAsyncResult *res,
+ GTask *task)
+{
+ GError *error = NULL;
+
+ if (!iface_modem_voice_parent->disable_unsolicited_events_finish (self, res, &error)) {
+ g_task_return_error (task, error);
+ g_object_unref (task);
+ return;
+ }
+
+ g_task_return_boolean (task, TRUE);
+ g_object_unref (task);
+}
+
+static void
own_voice_disable_unsolicited_events_ready (MMBaseModem *self,
GAsyncResult *res,
GTask *task)
@@ -1012,11 +1029,17 @@ own_voice_disable_unsolicited_events_ready (MMBaseModem *self,
GError *error = NULL;
mm_base_modem_at_command_full_finish (self, res, &error);
- if (error)
+ if (error) {
g_task_return_error (task, error);
- else
- g_task_return_boolean (task, TRUE);
- g_object_unref (task);
+ g_object_unref (task);
+ return;
+ }
+
+ /* Chain up parent's disable */
+ iface_modem_voice_parent->disable_unsolicited_events (
+ MM_IFACE_MODEM_VOICE (self),
+ (GAsyncReadyCallback)parent_voice_disable_unsolicited_events_ready,
+ task);
}
static void
@@ -1028,8 +1051,6 @@ modem_voice_disable_unsolicited_events (MMIfaceModemVoice *self,
task = g_task_new (self, NULL, callback, user_data);
- /* Note: no parent disable method */
-
mm_base_modem_at_command_full (
MM_BASE_MODEM (self),
mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)),