[Spice-devel] [PATCH spice-gtk v2] main: Handle file-xfer detailed errors

Victor Toso victortoso at redhat.com
Wed May 31 21:31:40 UTC 2017


Hi,

On Mon, May 29, 2017 at 04:26:20PM +0200, Jakub Janků wrote:
> Log appropriate error messages when we receive
> VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED,
> VD_AGENT_FILE_XFER_STATUS_AGENT_NOT_CONNECTED,
> VD_AGENT_FILE_XFER_STATUS_DISABLED.
> ---
>  src/channel-main.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
>
> diff --git a/src/channel-main.c b/src/channel-main.c
> index af1350c..4d6c416 100644
> --- a/src/channel-main.c
> +++ b/src/channel-main.c
> @@ -1882,6 +1882,19 @@ static void main_agent_handle_xfer_status(SpiceMainChannel *channel,
>          g_free(file_size_str);
>          break;
>      }
> +    case VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED:
> +        error = g_error_new_literal(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
> +                                    _("User's session is locked and cannot transfer files, "
> +                                      "unlock it and try again."));
> +        break;
> +    case VD_AGENT_FILE_XFER_STATUS_AGENT_NOT_CONNECTED:
> +        error = g_error_new_literal(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
> +                                    _( "Agent not connected."));

- remove extra space: _("..."));
- I think it should be "Session agent is not connected" or "vdagent is
  not connected"

> +        break;
> +    case VD_AGENT_FILE_XFER_STATUS_DISABLED:
> +        error = g_error_new_literal(SPICE_CLIENT_ERROR, SPICE_CLIENT_ERROR_FAILED,
> +                                    _("File transfer is disabled by spice agent."));

This is a cool one. An easy way to get this is trying file transfer on
Login Screen.

My only doubt is the preposition 'by', shouldn't it be 'in'?

Just minor things,
Acked-by: Victor Toso <victortoso at redhat.com>

> +        break;
>      case VD_AGENT_FILE_XFER_STATUS_SUCCESS:
>          break;
>      default:
> -- 
> 2.13.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170531/bacaf436/attachment.sig>


More information about the Spice-devel mailing list