[PATCH 1/3] call-list: fix mm_call_list_delete_call to use g_task_report_new_error
Ben Chan
benchan at chromium.org
Tue Jul 18 01:10:59 UTC 2017
Commit a08064492 ("call-list: port mm_call_list_delete_call to use GTask")
ported most of the mm_call_list_delete_call code to use GTask, but missed a
g_simple_async_report_error_in_idle calls, which can potentially lead to
an incorrect G_TASK cast in mm_call_list_delete_call_finish.
---
src/mm-call-list.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/mm-call-list.c b/src/mm-call-list.c
index 1cc1f543..9457bb2b 100644
--- a/src/mm-call-list.c
+++ b/src/mm-call-list.c
@@ -283,13 +283,14 @@ mm_call_list_delete_call (MMCallList *self,
(gpointer)call_path,
(GCompareFunc)cmp_call_by_path);
if (!l) {
- g_simple_async_report_error_in_idle (G_OBJECT (self),
- callback,
- user_data,
- MM_CORE_ERROR,
- MM_CORE_ERROR_NOT_FOUND,
- "No CALL found with path '%s'",
- call_path);
+ g_task_report_new_error (self,
+ callback,
+ user_data,
+ mm_call_list_delete_call,
+ MM_CORE_ERROR,
+ MM_CORE_ERROR_NOT_FOUND,
+ "No CALL found with path '%s'",
+ call_path);
return;
}
--
2.13.2.932.g7449e964c-goog
More information about the ModemManager-devel
mailing list