iface-modem-time: fix update_network_timezone to use g_task_report_new_error

Commit 7c5f308af ("iface-modem-time: port update_network_timezone to use
GTask") ported most of the update_network_timezone code to use GTask,
but missed a g_simple_async_report_error_in_idle call, which could
potentially lead to an incorrect G_TASK cast.
This commit is contained in:
Ben Chan
2017-07-18 10:33:00 +02:00
committed by Aleksander Morgado
parent 0657914ebb
commit d25e6bdfaa
+7 -6
View File
@@ -327,12 +327,13 @@ update_network_timezone (MMIfaceModemTime *self,
/* If loading network timezone not supported, just finish here */
if (!MM_IFACE_MODEM_TIME_GET_INTERFACE (self)->load_network_timezone ||
!MM_IFACE_MODEM_TIME_GET_INTERFACE (self)->load_network_timezone_finish) {
g_simple_async_report_error_in_idle (G_OBJECT (self),
callback,
user_data,
MM_CORE_ERROR,
MM_CORE_ERROR_UNSUPPORTED,
"Loading network timezone is not supported");
g_task_report_new_error (self,
callback,
user_data,
update_network_timezone,
MM_CORE_ERROR,
MM_CORE_ERROR_UNSUPPORTED,
"Loading network timezone is not supported");
return;
}