[Spice-devel] [PATCH spice-html5 2/2] main: Add event to alert file transfer error messages

Tomáš Bohdálek tom.bohdalek at gmail.com
Mon Sep 18 08:28:55 UTC 2017


Hi Jeremy,

I will fix it and yes, we can just add condition to unhandled errors.

Tomáš

2017-09-15 20:18 GMT+02:00 Jeremy White <jwhite at codeweavers.com>:

> Hi Tomáš,
>
>
> On 09/06/2017 03:52 AM, Tomáš Bohdálek wrote:
> > ---
> >  main.js         | 15 +++++++++++++++
> >  spice.html      |  5 +++++
> >  spice_auto.html |  5 +++++
> >  3 files changed, 25 insertions(+)
> >
> > diff --git a/main.js b/main.js
> > index 0237f0e..447177b 100644
> > --- a/main.js
> > +++ b/main.js
> > @@ -385,20 +385,25 @@ SpiceMainConn.prototype.handle_file_xfer_status =
> function(file_xfer_status)
> >              break;
> >          case VD_AGENT_FILE_XFER_STATUS_ERROR:
> >              xfer_error = "some errors occurred in the spice agent";
> > +            this.file_xfer_detailed_errors(xfer_error);
> >              break;
> >          case VD_AGENT_FILE_XFER_STATUS_SUCCESS:
> >              break;
> >          case VD_AGENT_FILE_XFER_STATUS_NOT_ENOUGH_SPACE:
> >              xfer_error = "not enough space in the remote system";
> > +            this.file_xfer_detailed_errors(xfer_error);
> >              break;
> >          case VD_AGENT_FILE_XFER_STATUS_SESSION_LOCKED:
> >              xfer_error = "remote system is locked";
> > +            this.file_xfer_detailed_errors(xfer_error);
> >              break;
> >          case VD_AGENT_FILE_XFER_STATUS_AGENT_NOT_CONNECTED:
> >              xfer_error = "spice angent is not connected";
>
> Mind fixing this typo when you get a second?
>
> > +            this.file_xfer_detailed_errors(xfer_error);
> >              break;
> >          case VD_AGENT_FILE_XFER_STATUS_DISABLED:
> >              xfer_error = "file transfer is disabled on the remote
> system";
> > +            this.file_xfer_detailed_errors(xfer_error);
> >              break;
> >          default:
> >              xfer_error = "unhandled status type: " +
> file_xfer_status.result;
> > @@ -506,3 +511,13 @@ SpiceMainConn.prototype.relative_now = function()
> >      var ret = (Date.now() - this.our_mm_time) + this.mm_time;
> >      return ret;
>
> Why not also alert for unhandled errors and for cases where the transfer
> was canceled by the agent?  In other words, why not just a:
>   if (file_xfer_status.result != VD_AGENT_FILE_XFER_STATUS_SUCCESS)
> ?
>
> Cheers,
>
> Jeremy
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170918/6859ca99/attachment-0001.html>


More information about the Spice-devel mailing list