Re: [PATCH spice-gtk 5/5] webdav: don't warn on cancel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> The IO operation is cancelled on channel dispose
> and it is not an error, so silence the warnings.
> 
> Signed-off-by: Jakub Janků <jjanku@xxxxxxxxxx>
> ---
>  src/channel-webdav.c | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/src/channel-webdav.c b/src/channel-webdav.c
> index 34d88a9..7bec2a0 100644
> --- a/src/channel-webdav.c
> +++ b/src/channel-webdav.c
> @@ -409,7 +409,8 @@ static void data_read_cb(GObject *source_object,
>  
>      size =
>      spice_vmc_input_stream_read_all_finish(G_INPUT_STREAM(source_object),
>      res, &error);
>      if (error) {
> -        g_warning("error: %s", error->message);
> +        if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
> +            g_warning("error: %s", error->message);

Minor style: always use brackets.

>          g_clear_error(&error);
>          return;
>      }
> @@ -453,7 +454,8 @@ static void size_read_cb(GObject *source_object,
>  
>  end:
>      if (error) {
> -        g_warning("error: %s", error->message);
> +        if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
> +            g_warning("error: %s", error->message);
>          g_clear_error(&error);
>      }
>  }
> @@ -480,7 +482,8 @@ static void client_read_cb(GObject *source_object,
>  
>  end:
>      if (error) {
> -        g_warning("error: %s", error->message);
> +        if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
> +            g_warning("error: %s", error->message);
>          g_clear_error(&error);
>      }
>  }

Otherwise,
  Acked-by: Frediano Ziglio <fziglio@xxxxxxxxxx>

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]