Re: [virt-viewer PATCH] Show errors generated by connection dialog

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

 



On 08/02/17 14:48, Christophe de Dinechin wrote:
> When running 'remote-viewer' without arguments,
> and selecting a non-supported protocol, e.g. ssh://foo,
> the generated error was silently swallowed by the retry loop.
> This was introduced in 06b2c382468876a19600374bd59475e66d488af8.
> ---
>  src/remote-viewer.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/src/remote-viewer.c b/src/remote-viewer.c
> index 13c6e7c..c9ef4bb 100644
> --- a/src/remote-viewer.c
> +++ b/src/remote-viewer.c
> @@ -1196,6 +1196,9 @@ cleanup:
>      type = NULL;
>  
>      if (!ret && priv->open_recent_dialog) {
> +        if (error) {
> +            virt_viewer_app_simple_message_dialog(&self->parent, "%s", error->message);
> +        }

Patch looks good, I personally also like to check for error->message
before dereferencing it, but I don't really know what others think about it.

Reviewed-by: Eduardo Lima (Etrunko) <etrunko@xxxxxxxxxx>

-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etrunko@xxxxxxxxxx

_______________________________________________
virt-tools-list mailing list
virt-tools-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/virt-tools-list



[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux