summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2012-11-27 20:50:14 (GMT)
committerDan Williams <dcbw@redhat.com>2012-11-27 20:50:14 (GMT)
commit2f28193cd48a8d965ad9e26f1b918649ba10f5ec (patch)
treee949a2654e7c6fad0b1541fbee34855ca75d9042
parentef644fba84544c1a91b3fd2b510e39f9877b3680 (diff)
broadband-modem-huawei: don't call non-existent MMBroadbandModem CDMA functions
-rw-r--r--plugins/huawei/mm-broadband-modem-huawei.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 5cac1fd..0ee81be 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -1203,11 +1203,21 @@ modem_cdma_setup_unsolicited_events (MMIfaceModemCdma *self,
user_data,
modem_cdma_setup_unsolicited_events);
- /* Chain up parent's setup */
- iface_modem_cdma_parent->setup_unsolicited_events (
- self,
- (GAsyncReadyCallback)parent_cdma_setup_unsolicited_events_ready,
- result);
+ /* Chain up parent's setup if needed */
+ if (iface_modem_cdma_parent->setup_unsolicited_events &&
+ iface_modem_cdma_parent->setup_unsolicited_events_finish) {
+ iface_modem_cdma_parent->setup_unsolicited_events (
+ self,
+ (GAsyncReadyCallback)parent_cdma_setup_unsolicited_events_ready,
+ result);
+ return;
+ }
+
+ /* Otherwise just run our setup and complete */
+ set_cdma_unsolicited_events_handlers (MM_BROADBAND_MODEM_HUAWEI (self), TRUE);
+ g_simple_async_result_set_op_res_gboolean (G_SIMPLE_ASYNC_RESULT (result), TRUE);
+ g_simple_async_result_complete_in_idle (result);
+ g_object_unref (result);
}
static void