Re: [Spice-devel] Patch to support LZ4 compression algorithm‏‏

2015-01-08 Thread Fabio Fantoni
Il 07/01/2015 10:13, LgDoor ha scritto: > I think the cause of this problem is the unnecessary step of flipping the > bitmap buffer lines when encoding, since the surface in the client will be > created with the top-down param. > this patch just works. I tried your patch in attachment removing

[Spice-devel] [PATCH spice-html5] Report SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS capability

2015-01-08 Thread Pavel Grunt
We should report that we handle the connected tokens message by setting the SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS capability. --- Depends on http://lists.freedesktop.org/archives/spice-devel/2015-January/018538.html --- enums.js | 5 + spiceconn.js | 4 2 files changed, 9 insertions(

Re: [Spice-devel] [PATCH spice-html5 1/4] Handle agent tokens

2015-01-08 Thread Pavel Grunt
> > As far as I know, the server will only use the conencted_tokens > message > is we report SPICE_MAIN_CAP_AGENT_CONNECTED_TOKENS. But we do not > report that cap (or any main channel caps). > > You could readily do it using the same logic that is found in pushing > CAP_OPUS. > > Cheers, > >

Re: [Spice-devel] [xf86-video-qxl v6] Enable smartcard support for XSpice.

2015-01-08 Thread Jeremy White
2. What happens if h->length == 0 ? Note that I believe that could only occur in the case of a malicious or buggy packet. By inspection, I believe the code will all function correctly; passing a 0 length atr along. Is this to the card (hardware) or back? if to, can't this be used by a driver

Re: [Spice-devel] [PATCH spice-html5 1/4] Handle agent tokens

2015-01-08 Thread Jeremy White
On 01/08/2015 03:48 AM, Pavel Grunt wrote: Since you're genuinely using this message, shouldn't we now advertise the connected token CAP? I am not sure what CAP you mean. We send the SPICE_MSGC_MAIN_AGENT_START message when the SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENS message is received. A

[Spice-devel] [PATCH spice-html5 2/5] Send agent messages only when have agent tokens

2015-01-08 Thread Pavel Grunt
Messages that were not sent are stored in the queue. They will be sent later when the client receives more agent tokens. --- main.js | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/main.js b/main.js index d9c9f75..d10b594 100644 --- a/main.js +

[Spice-devel] [PATCH spice-html5 5/5] Read file only when have agent tokens

2015-01-08 Thread Pavel Grunt
Stop reading file when there are no tokens, continue reading it when tokens arrive. --- main.js | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index 5c4a470..7c36342 100644 --- a/main.js +++ b/main.js @@ -58,6 +58,7 @@ function SpiceMainCon

[Spice-devel] [PATCH spice-html5 v2 4/5] Use drag and drop for transfering files from client to guest

2015-01-08 Thread Pavel Grunt
--- v2: - adds missing removeEventListeners --- filexfer.js | 22 ++ spice.html | 15 +++ spice_auto.html | 15 +++ 3 files changed, 52 insertions(+) diff --git a/filexfer.js b/filexfer.js index d472240..2ba0671 100644 --- a/filexfer.js +++ b/

[Spice-devel] [PATCH spice-html5 1/5] Handle agent tokens

2015-01-08 Thread Pavel Grunt
--- main.js | 20 ++-- spicemsg.js | 15 +++ 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/main.js b/main.js index e487551..d9c9f75 100644 --- a/main.js +++ b/main.js @@ -87,6 +87,8 @@ SpiceMainConn.prototype.process_channel_message = function(msg

[Spice-devel] [PATCH spice-html5 v2 3/5] Implement methods for transfering files from client to guest

2015-01-08 Thread Pavel Grunt
It is possible to transfer files from the client to the guest using File API [0] when a spice vd agent is connected. Methods for the transfer are based on spice-gtk implementation. [0] http://www.w3.org/TR/file-upload/ --- v2: - adds task counter, missing check for the task existence, SpiceMsgM

[Spice-devel] [PATCH spice-html5 v2 0/5] Enable file transfer from client to guest

2015-01-08 Thread Pavel Grunt
Hi, the intetion of this series is to add the ability to transfer files from the client to the guest. To make it work it was convenient to start using agent tokens (PATCH 1/5 & 2/5) because there can be a lot of agent messages when sending a file. Methods for the transfer are based on relevant m

Re: [Spice-devel] [xf86-video-qxl v6] Enable smartcard support for XSpice.

2015-01-08 Thread Alon Levy
On 01/08/2015 04:10 PM, Jeremy White wrote: > On 01/08/2015 03:53 AM, Uri Lublin wrote: >> Hi Jeremy, >> >> Ack. > > Thanks. > >> >> h->length is unsigned. >> 1. Why is there a need to check that h->length > 0 ? > > There is no need, changed. > >> 2. What happens if h->length == 0 ? > > Note t

Re: [Spice-devel] [xf86-video-qxl v6] Enable smartcard support for XSpice.

2015-01-08 Thread Jeremy White
On 01/08/2015 03:53 AM, Uri Lublin wrote: Hi Jeremy, Ack. Thanks. h->length is unsigned. 1. Why is there a need to check that h->length > 0 ? There is no need, changed. 2. What happens if h->length == 0 ? Note that I believe that could only occur in the case of a malicious or buggy p

Re: [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE

2015-01-08 Thread Javier Celaya
Sure, for the help text of the image-compression option, thanks. El Jueves, 8 de enero de 2015 12:48:57 Fabio Fantoni escribió: > Il 08/01/2015 11:50, Javier Celaya ha scritto: > > Hello > > > > Recently, SPICE included the lz4 compression algorithm. This patch adds > > a command line option to s

Re: [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE

2015-01-08 Thread Fabio Fantoni
Il 08/01/2015 11:50, Javier Celaya ha scritto: > Hello > > Recently, SPICE included the lz4 compression algorithm. This patch adds > a command line option to select it. However, SPICE_IMAGE_COMPRESS_LZ4 did not > exist before the commit that added this compression algorithm, so it should > be >

Re: [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE

2015-01-08 Thread Gerd Hoffmann
On Do, 2015-01-08 at 11:50 +0100, Javier Celaya wrote: > Hello > > Recently, SPICE included the lz4 compression algorithm. This patch adds > a command line option to select it. However, SPICE_IMAGE_COMPRESS_LZ4 did not > exist before the commit that added this compression algorithm, so it should

[Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE

2015-01-08 Thread Javier Celaya
Hello Recently, SPICE included the lz4 compression algorithm. This patch adds a command line option to select it. However, SPICE_IMAGE_COMPRESS_LZ4 did not exist before the commit that added this compression algorithm, so it should be guarded with conditional compilation. How do you think this s

Re: [Spice-devel] [PATCH spice-html5 3/4] Implement methods for transfering files from client to guest

2015-01-08 Thread Pavel Grunt
> > > +if (msg.type == SPICE_MSG_MAIN_AGENT_DATA) > > +{ > > +var agent_data = new SpiceMsgcMainAgentData(0, msg.data); > > This should be a separate type; SpiceMsgMainAgentData, not Msgc. > > > +SpiceMainConn.prototype.file_xfer_start = function(file) > > +{ > > +var task_i

Re: [Spice-devel] [xf86-video-qxl v6] Enable smartcard support for XSpice.

2015-01-08 Thread Uri Lublin
Hi Jeremy, Ack. Please see two minor comments below. Thanks, Uri. On 12/16/2014 12:24 AM, Jeremy White wrote: This is done by creating a Unix domain socket to which smartcard messages are transferred, using the vscard protocol. A further system library, spiceccid, is used to provide an

Re: [Spice-devel] [PATCH spice-html5 1/4] Handle agent tokens

2015-01-08 Thread Pavel Grunt
> > Since you're genuinely using this message, shouldn't we now advertise > the connected token CAP? > I am not sure what CAP you mean. We send the SPICE_MSGC_MAIN_AGENT_START message when the SPICE_MSG_MAIN_AGENT_CONNECTED_TOKENS message is received. Best regards, Pavel

Re: [Spice-devel] [PATCH spice-html5 0/4] Enable file transfer from client to guest

2015-01-08 Thread Pavel Grunt
Hi Jeremy, Thanks a lot for your feedback. > > Hi Pavel, > > > This looks like a great addition; thanks for doing this work. > > I've got a few general questions, and then some specific comments on > some of the patches. > > General questions: what browsers have you tested this with? > Oste