huawei: fix crash disabling CDMA unsolicited response handlers
Parent MMBroadbandModem may not implement these functions so we shouldn't call them unless it does.
This commit is contained in:
@@ -1498,11 +1498,20 @@ modem_cdma_cleanup_unsolicited_events (MMIfaceModemCdma *self,
|
|||||||
/* Our own cleanup first */
|
/* Our own cleanup first */
|
||||||
set_cdma_unsolicited_events_handlers (MM_BROADBAND_MODEM_HUAWEI (self), FALSE);
|
set_cdma_unsolicited_events_handlers (MM_BROADBAND_MODEM_HUAWEI (self), FALSE);
|
||||||
|
|
||||||
/* And now chain up parent's cleanup */
|
/* Chain up parent's setup if needed */
|
||||||
iface_modem_cdma_parent->cleanup_unsolicited_events (
|
if (iface_modem_cdma_parent->cleanup_unsolicited_events &&
|
||||||
self,
|
iface_modem_cdma_parent->cleanup_unsolicited_events_finish) {
|
||||||
(GAsyncReadyCallback)parent_cdma_cleanup_unsolicited_events_ready,
|
iface_modem_cdma_parent->cleanup_unsolicited_events (
|
||||||
result);
|
self,
|
||||||
|
(GAsyncReadyCallback)parent_cdma_cleanup_unsolicited_events_ready,
|
||||||
|
result);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Otherwise we're done */
|
||||||
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
Reference in New Issue
Block a user