[Spice-devel] [PATCH spice-gtk] xfer: send data message of size 0 for 0-size file
Marc-André Lureau
marcandre.lureau at gmail.com
Fri Aug 29 08:55:03 PDT 2014
On Fri, Aug 29, 2014 at 5:07 PM, Jonathon Jongsma <jjongsma at redhat.com>
wrote:
> On Fri, 2014-08-29 at 09:55 +0200, Christophe Fergeau wrote:
> > Hey,
> >
> > On Thu, Aug 28, 2014 at 10:19:04PM +0200, Marc-André Lureau wrote:
> > > Make sure we send a xfer data message for 0-size files.
> > > This avoid leaking file descriptiors in guest agent when
> > > copying such files.
> >
> > Has this been tested or should I give it a try? ACK if this has been
> > tested. You could add a note that the bug was reported by Cody maybe
>
> Is there any way for the agent to avoid leaking file descriptors even in
> the face of a poorly-behaving client?
>
>
Well, it could lazily open the file. But if the client is broken in other
ways and doesn't transmit the whole file, it will also "leak" the fd.
Most download operations have timeout. Arguably, this is a user triggered
action, so if the file is idle for a few minutes, transfer should be
cancelled.
Tbh, I wouldn't put too much efforts in xfer in general. Once people start
using shared folder, they can use or copy files around with "native" tools
and have better desktop integration in general.
For file DND in general, this is a more tricky question, but the plan is to
rely on the share folder to do that - uri links would be converted to local
shared folder "virtual" links, such as ~/.spice/dnd-ID/fileN that the
client will interpret to match the file to be copied. That way, we get
native integration for file copy operations (nautilus/explorer progression
dialog, cancel buttons, timeout etc)
--
Marc-André Lureau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20140829/5b26634c/attachment.html>
More information about the Spice-devel
mailing list