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