[Spice-devel] [phodav PATCH RFC] webdavd: Automount shared folder on Windows

Marc-André Lureau mlureau at redhat.com
Tue Aug 11 04:08:40 PDT 2015


Hi

----- Original Message -----
> > >  - Webdavd service on Windows doesn't notice, when the sharing is
> > >  disabled.
> > >     - This could be fixed, if vd_agent handled the start and stop of
> > >       webdavd according to state of the Share Folder button in viewer.
> > 
> > Well, it should notice that connection is gone, the read returns an error.
> > There might be a better way to wait until the connection is up instead (I
> > remember I couldn't find one, but it should be doable).
> 
> When I disabled the sharing, the reads stays blocked for some reason.
> I'll keep looking for a solution for this. It's really weird, that it doesn't
> notice it.

Ah, interesting. It looks like the first thing to do is to ask the virtio
Windows developer, to see if we can fix this so it would behave the same
as on Linux.

> > >  - I tried calling this function in callback, in g_task, but it seems,
> > >  that
> > >    Windows can only succesfully map the drive, if the function is called
> > >    AFTER the first read (which blocks), that's why I decided to use a new
> > >    thread.
> > >      - This seems to be the only way to mount the drive in webdavd
> > >      itself.
> 
> > When mounting, Windows will try to populate the folder, so the connection
> > must be up before that. (I don't think a thread helps).
> 
> Yes. The thread doesn't help in that the connection must be running, The
> problem is, that the read blocks when connected,

You mean "disconnected on Windows", right?

> and I have no way to connect after that. The thread just makes sure, that I
> can call connect function even when the read is blocked.
> There might be a better approach to this, but I couldn't find any that would
> work and/or wouldn't need significant refactoring.
> 
> All in all, I'll clean up the thread, so it doesn't use a while loop and uses
> the polling, that is currently implemented
> (though this will spawn and join a thread with every poll). I'll also clean
> up the connection, so that the letter is dynamic,
> and it doesn't connect when the drive is already mapped.

Ok, looking forward for the next version.


More information about the Spice-devel mailing list