diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-09 10:49:20 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2019-10-11 07:27:59 +0000 |
commit | 651bfd62b4c0ad06613541f8e8168832fc57da9a (patch) | |
tree | a07cd1b7819240821bc030cd2a725ca3b66731fc /src/mm-port-serial.c | |
parent | fa453a17a5197ebec793056bb23895a887fb093a (diff) |
port-serial: avoid using MM_CORE_ERROR_CANCELLED
Diffstat (limited to 'src/mm-port-serial.c')
-rw-r--r-- | src/mm-port-serial.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/mm-port-serial.c b/src/mm-port-serial.c index 052d0dd8..3101ce6e 100644 --- a/src/mm-port-serial.c +++ b/src/mm-port-serial.c @@ -815,8 +815,7 @@ port_serial_response_wait_cancelled (GCancellable *cancellable, /* FIXME: This is not completely correct - if the response finally arrives and there's * some other command waiting for response right now, the other command will * get the output of the cancelled command. Not sure what to do here. */ - error = g_error_new_literal (MM_CORE_ERROR, - MM_CORE_ERROR_CANCELLED, + error = g_error_new_literal (G_IO_ERROR, G_IO_ERROR_CANCELLED, "Waiting for the reply cancelled"); /* Note: may complete last operation and unref the MMPortSerial */ port_serial_got_response (self, NULL, error); @@ -1566,10 +1565,7 @@ port_serial_reopen_cancel (MMPortSerial *self) task = self->priv->reopen_task; self->priv->reopen_task = NULL; - g_task_return_new_error (task, - MM_CORE_ERROR, - MM_CORE_ERROR_CANCELLED, - "Reopen cancelled"); + g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_CANCELLED, "Reopen cancelled"); g_object_unref (task); } @@ -1740,7 +1736,7 @@ mm_port_serial_flash_finish (MMPortSerial *port, static gboolean flash_cancel_cb (GTask *task) { - g_task_return_new_error (task, MM_CORE_ERROR, MM_CORE_ERROR_CANCELLED, "Flash cancelled"); + g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_CANCELLED, "Flash cancelled"); g_object_unref (task); return G_SOURCE_REMOVE; } |