From 0657914ebbe387a4bb356303086fe0f354d88756 Mon Sep 17 00:00:00 2001 From: Ben Chan Date: Mon, 17 Jul 2017 18:10:59 -0700 Subject: [PATCH] call-list: fix mm_call_list_delete_call to use g_task_report_new_error 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; }