<div dir="ltr">Hi Jeremy,<div><br></div><div>on success we don't display anything, so we can send message with success to the console.</div><div><br></div><div>I will fix incorrect '>=' in spicemsg.</div><div><br></div><div>Tomáš</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-09-15 20:13 GMT+02:00 Jeremy White <span dir="ltr"><<a href="mailto:jwhite@codeweavers.com" target="_blank">jwhite@codeweavers.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tomáš,<br>
<div><div class="h5"><br>
On 09/06/2017 03:52 AM, Tomáš Bohdálek wrote:<br>
> ---<br>
> enums.js | 12 ++++++++++--<br>
> main.js | 16 +++++++++++++++-<br>
> spicemsg.js | 4 ++++<br>
> 3 files changed, 29 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/enums.js b/enums.js<br>
> index d5a9003..7154595 100644<br>
> --- a/enums.js<br>
> +++ b/enums.js<br>
> @@ -369,12 +369,20 @@ var VD_AGENT_CAP_MOUSE_STATE = 0,<br>
> VD_AGENT_CAP_GUEST_LINEEND_LF = 8,<br>
> VD_AGENT_CAP_GUEST_LINEEND_<wbr>CRLF = 9,<br>
> VD_AGENT_CAP_MAX_CLIPBOARD = 10,<br>
> - VD_AGENT_END_CAP = 11;<br>
> + VD_AGENT_CAP_AUDIO_VOLUME_SYNC = 11,<br>
> + VD_AGENT_CAP_MONITORS_CONFIG_<wbr>POSITION = 12,<br>
> + VD_AGENT_CAP_FILE_XFER_<wbr>DISABLED = 13,<br>
> + VD_AGENT_CAP_FILE_XFER_<wbr>DETAILED_ERRORS = 14,<br>
> + VD_AGENT_END_CAP = 15;<br>
><br>
> var VD_AGENT_FILE_XFER_STATUS_CAN_<wbr>SEND_DATA = 0,<br>
> VD_AGENT_FILE_XFER_STATUS_<wbr>CANCELLED = 1,<br>
> VD_AGENT_FILE_XFER_STATUS_<wbr>ERROR = 2,<br>
> - VD_AGENT_FILE_XFER_STATUS_<wbr>SUCCESS = 3;<br>
> + VD_AGENT_FILE_XFER_STATUS_<wbr>SUCCESS = 3,<br>
> + VD_AGENT_FILE_XFER_STATUS_NOT_<wbr>ENOUGH_SPACE = 4,<br>
> + VD_AGENT_FILE_XFER_STATUS_<wbr>SESSION_LOCKED = 5,<br>
> + VD_AGENT_FILE_XFER_STATUS_<wbr>AGENT_NOT_CONNECTED = 6,<br>
> + VD_AGENT_FILE_XFER_STATUS_<wbr>DISABLED = 7;<br>
><br>
> var SPICE_STREAM_FLAGS_TOP_DOWN = (1 << 0);<br>
<br>
</div></div>This bit does not apply for me, as the master does appear to have that<br>
top down flag.<br>
<div><div class="h5"><br>
><br>
> diff --git a/main.js b/main.js<br>
> index 173ff97..0237f0e 100644<br>
> --- a/main.js<br>
> +++ b/main.js<br>
> @@ -344,7 +344,8 @@ SpiceMainConn.prototype.<wbr>announce_agent_capabilities = function(request)<br>
> {<br>
> var caps = new VDAgentAnnounceCapabilities(<wbr>request, (1 << VD_AGENT_CAP_MOUSE_STATE) |<br>
> (1 << VD_AGENT_CAP_MONITORS_CONFIG) |<br>
> - (1 << VD_AGENT_CAP_REPLY));<br>
> + (1 << VD_AGENT_CAP_REPLY) |<br>
> + (1 << VD_AGENT_CAP_FILE_XFER_<wbr>DETAILED_ERRORS));<br>
> this.send_agent_message(VD_<wbr>AGENT_ANNOUNCE_CAPABILITIES, caps);<br>
> }<br>
><br>
> @@ -387,11 +388,24 @@ SpiceMainConn.prototype.<wbr>handle_file_xfer_status = function(file_xfer_status)<br>
> break;<br>
> case VD_AGENT_FILE_XFER_STATUS_<wbr>SUCCESS:<br>
> break;<br>
> + case VD_AGENT_FILE_XFER_STATUS_NOT_<wbr>ENOUGH_SPACE:<br>
> + xfer_error = "not enough space in the remote system";<br>
> + break;<br>
> + case VD_AGENT_FILE_XFER_STATUS_<wbr>SESSION_LOCKED:<br>
> + xfer_error = "remote system is locked";<br>
> + break;<br>
> + case VD_AGENT_FILE_XFER_STATUS_<wbr>AGENT_NOT_CONNECTED:<br>
> + xfer_error = "spice angent is not connected";<br>
> + break;<br>
> + case VD_AGENT_FILE_XFER_STATUS_<wbr>DISABLED:<br>
> + xfer_error = "file transfer is disabled on the remote system";<br>
> + break;<br>
> default:<br>
> xfer_error = "unhandled status type: " + file_xfer_status.result;<br>
> break;<br>
> }<br>
><br>
> + xfer_error = "File transfer: " + xfer_error;<br>
> this.file_xfer_completed(xfer_<wbr>task, xfer_error)<br>
<br>
</div></div>Question: What do we display on success? It seems like it might be an<br>
opportunity to put in a nicer message.<br>
<span class=""><br>
> }<br>
><br>
> diff --git a/spicemsg.js b/spicemsg.js<br>
> index 3619996..7ebc64b 100644<br>
> --- a/spicemsg.js<br>
> +++ b/spicemsg.js<br>
> @@ -577,6 +577,10 @@ VDAgentFileXferStatusMessage.<wbr>prototype =<br>
> var dv = new SpiceDataView(a);<br>
> <a href="http://this.id" rel="noreferrer" target="_blank">this.id</a> = dv.getUint32(at, true); at += 4;<br>
> this.result = dv.getUint32(at, true); at += 4;<br>
> + if (this.result >= VD_AGENT_FILE_XFER_STATUS_NOT_<wbr>ENOUGH_SPACE)<br>
<br>
</span>Shouldn't that be '==', not '>=' ?<br>
<span class=""><br>
> + {<br>
> + this.data = dv.getUint64(at, true); at += 8;<br>
> + }<br>
<br>
</span>Cheers,<br>
<br>
Jeremy<br>
______________________________<wbr>_________________<br>
Spice-devel mailing list<br>
<a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.<wbr>org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/spice-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/spice-devel</a><br>
</blockquote></div><br></div>