[PATCH 4/4] base-sms: port mm_base_sms_delete to use GTask
Aleksander Morgado
aleksander at aleksander.es
Mon Jul 3 08:51:02 UTC 2017
On 01/07/17 09:35, Ben Chan wrote:
> ---
> src/mm-base-sms.c | 19 ++++++++++---------
> 1 file changed, 10 insertions(+), 9 deletions(-)
>
Pushed to git master, thanks.
> diff --git a/src/mm-base-sms.c b/src/mm-base-sms.c
> index 93fe31e5..44d228b8 100644
> --- a/src/mm-base-sms.c
> +++ b/src/mm-base-sms.c
> @@ -1482,13 +1482,13 @@ mm_base_sms_delete_finish (MMBaseSms *self,
> return deleted;
> }
>
> - return !g_simple_async_result_propagate_error (G_SIMPLE_ASYNC_RESULT (res), error);
> + return g_task_propagate_boolean (G_TASK (res), error);
> }
>
> void
> mm_base_sms_delete (MMBaseSms *self,
> - GAsyncReadyCallback callback,
> - gpointer user_data)
> + GAsyncReadyCallback callback,
> + gpointer user_data)
> {
> if (MM_BASE_SMS_GET_CLASS (self)->delete &&
> MM_BASE_SMS_GET_CLASS (self)->delete_finish) {
> @@ -1496,12 +1496,13 @@ mm_base_sms_delete (MMBaseSms *self,
> return;
> }
>
> - g_simple_async_report_error_in_idle (G_OBJECT (self),
> - callback,
> - user_data,
> - MM_CORE_ERROR,
> - MM_CORE_ERROR_UNSUPPORTED,
> - "Deleting SMS is not supported by this modem");
> + g_task_report_new_error (self,
> + callback,
> + user_data,
> + mm_base_sms_delete,
> + MM_CORE_ERROR,
> + MM_CORE_ERROR_UNSUPPORTED,
> + "Deleting SMS is not supported by this modem");
> }
>
> /*****************************************************************************/
>
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list