[PATCH 3/3] sms-mbim: fix peek_device to use g_task_report_new_error
Ben Chan
benchan at chromium.org
Tue Jul 18 01:11:01 UTC 2017
When porting MMSmsMbim to use GTask, peek_device wasn't modified to use
g_task_report_new_error, which could potentially lead to an incorrect
G_TASK cast.
---
src/mm-sms-mbim.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/mm-sms-mbim.c b/src/mm-sms-mbim.c
index 99e0de74..e20a83d2 100644
--- a/src/mm-sms-mbim.c
+++ b/src/mm-sms-mbim.c
@@ -53,12 +53,13 @@ peek_device (gpointer self,
port = mm_base_modem_peek_port_mbim (modem);
if (!port) {
- g_simple_async_report_error_in_idle (G_OBJECT (self),
- callback,
- user_data,
- MM_CORE_ERROR,
- MM_CORE_ERROR_FAILED,
- "Couldn't peek MBIM port");
+ g_task_report_new_error (self,
+ callback,
+ user_data,
+ peek_device,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_FAILED,
+ "Couldn't peek MBIM port");
g_object_unref (modem);
return FALSE;
}
--
2.13.2.932.g7449e964c-goog
More information about the ModemManager-devel
mailing list