<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)"><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 12, 2014 at 12:58 AM, Marc-André Lureau <span dir="ltr"><<a href="mailto:mlureau@redhat.com" target="_blank">mlureau@redhat.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
<br>
----- Original Message -----<br>
> On windows guest, after dra gging a zero-size file, the file will be occupied<br>
<div class="">> by vdagent. For spice-gtk ignores this case, and stops sending data after<br>
> sending<br>
> a start message to agent, see here for more details:<br>
> <a href="http://lists.freedesktop.org/archives/spice-devel/2014-August/017184.html" target="_blank">http://lists.freedesktop.org/archives/spice-devel/2014-August/017184.html</a><br>
> I accept the suggestion of Christophe and fix the bug in spice-gtk.<br>
> Pay attention to the modification of<br>
> ​<br>
> agent_msg_queue_many, I think it's a small trick.<br>
<br>
</div>Isn't this changing the protocol?<br>
<br>
We use to send xfer-start of data size 0 and then xfer-data of data size 0, and now we skip the second part.<br>
<br>
That's an an incompatible change. I would prefer if we keep sending the xfer-data message, even if it is of size 0.<br>
<br>
Or if you prefer don't initiate xfer at all if the file size is 0. But I don't think that's worth it, and it would be some "racy" code (check size before doing actual operation)</blockquote><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">

​You mean client shouldn't send a zero-size file?I think sending such file is ​meaningless, too.</div><div class="gmail_default" style="font-family:verdana,sans-serif;font-size:small;color:rgb(0,0,0)">And I prefer this can be fixed through a more <span style="font-family:'Microsoft YaHei';font-size:12.800000190734863px;white-space:nowrap">comfortable way.</span></div>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div class="h5">
> ​<br>
> ​<br>
> ---<br>
> gtk/channel-main.c | 4 ++--<br>
> 1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/gtk/channel-main.c b/gtk/channel-main.c<br>
> index 7a299a4..1e8e3f5 100644<br>
> --- a/gtk/channel-main.c<br>
> +++ b/gtk/channel-main.c<br>
> @@ -936,7 +936,7 @@ static void<br>
> ​​<br>
> agent_msg_queue_many(SpiceMainChannel *channel, int type, const void<br>
> memcpy(payload, &msg, sizeof(VDAgentMessage));<br>
> payload += sizeof(VDAgentMessage);<br>
> paysize -= sizeof(VDAgentMessage);<br>
> - if (paysize == 0) {<br>
> + if (size != 0 && paysize == 0) {<br>
> g_queue_push_tail(c->agent_msg_queue, out);<br>
> out = NULL;<br>
> }<br>
> @@ -1637,7 +1637,7 @@ static void file_xfer_read_cb(GObject *source_object,<br>
> return;<br>
> }<br>
><br>
> - if (count > 0) {<br>
> + if (count >= 0) {<br>
> task->read_bytes += count;<br>
> file_xfer_queue(task, count);<br>
> file_xfer_flush_async(channel, task->cancellable,<br>
> --<br>
> 1.9.3 ​<br>
><br>
> --<br>
> Q S B D T 0 R F U i B G U k 9 N I F J J R V N U I E 9 G I E N U U 0V V<br>
><br>
</div></div>> _______________________________________________<br>
> Spice-devel mailing list<br>
> <a href="mailto:Spice-devel@lists.freedesktop.org">Spice-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/spice-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/spice-devel</a><br>
><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><font color="#cfe2f3">Q</font><font color="#9fc5e8">S</font><font color="#6fa8dc">B</font><font color="#3d85c6">D</font><font color="#0b5394">T</font><font color="#073763">0</font><font color="#0c343d">R</font><font color="#134f5c">F</font><font color="#45818e">U</font><font color="#76a5af">i</font><font color="#a2c4c9">B</font><font color="#d0e0e3">G</font><font color="#d9ead3">U</font><font color="#b6d7a8">k</font><font color="#93c47d">9</font><font color="#6aa84f">N</font><font color="#38761d">I</font><font color="#274e13">F</font><font color="#7f6000">J</font><font color="#bf9000">J</font><font color="#f1c232">R</font><font color="#ffd966">V</font><font color="#ffe599">N</font><font color="#fff2cc">U</font><font color="#fce5cd">I</font><font color="#f9cb9c">E</font><font color="#f6b26b">9</font><font color="#e69138">G</font><font color="#b45f06">I</font><font color="#783f04">E</font><font color="#660000">N</font><font color="#990000">U</font><font color="#cc0000">U</font><font color="#e06666">0V</font><font color="#ea9999">V</font></div>


</div></div>