Hi, On Thu, Mar 24, 2016 at 10:46 AM, Victor Toso <li...@victortoso.com> wrote:
> Hi, > > On Thu, Mar 17, 2016 at 02:47:50PM +0100, Lukas Venhoda wrote: > > Check whether Spice Folder is already mapped. > > If yes, don't try to map another one. > > I have found some issue with this. If I disconnect a session that > was sharing the folder (~/public) and connect again and start sharing > (~/downloads) what should happen? > > It gets slow and the sharing did not really work in the second time but > it could be due another issue (I was running with valgrind too!) > > Anyway, if we have a new connection we might assume that old map does > not work anymore and unmap it... > > Yes, this would be better, but it would require VDAgent integration to check, when user connects, or disconnects. > > +static gboolean > > +is_spice_folder_mapped(void) > > +{ > *snip* > > + for (i = 0; i < 26; i++) > > + { > > + mask = max_mask >> i; > > + if (drives & mask) > > + { > > + local_name[0] = 'z' - i; > > + retval = WNetGetConnection (local_name, remote_name, > (LPDWORD)&size); > > + if (retval == NO_ERROR) > > + { > > + if (strncmp (remote_name, "\\\\localhost@9843\\DavWWWRoot", > 28) == 0) > > I think the port can be changed (--port) so, better not to hardcode it. > changed -- Lukas Venhoda
_______________________________________________ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel