<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style></head><body lang="CS" link="blue" vlink="#954F72"><div class="WordSection1"><p class="MsoNormal">Hi</p><p class="MsoNormal"> </p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0cm 0cm 0cm"><p class="MsoNormal" style="border:none;padding:0cm"><b>From: </b><a href="mailto:lists@victortoso.com">Victor Toso</a><br><b>Sent: </b>pondělí 2. května 2016 10:30<br><b>To: </b><a href="mailto:lvenhoda@redhat.com">Lukas Venhoda</a><br><b>Cc: </b><a href="mailto:spice-devel@lists.freedesktop.org">spice-devel@lists.freedesktop.org</a><br><b>Subject: </b>Re: [Spice-devel] [phodav PATCH 3/3 v5] spice-webdavd-windows: Dismount shared folder on service stop</p></div><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif"> </span></p><p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Times New Roman",serif">Hi,</span><span style="font-size:12.0pt;font-family:"Times New Roman",serif"><br><br>On Mon, May 02, 2016 at 10:05:33AM +0200, Lukas Venhoda wrote:<br>> Why not use the same struct in both contexts and a mutex to avoid<br>> concurrency<br>> problems?<br>><br>> Cheers,<br>>   toso<br>><br>>             Because ServiceData is not used, when called with --no-service.<br>><br>>             It won’t be created on stack, and would need to be allocated<br>> afterwards in run_service, just so that we don’t use gchar*.<br><br>--no-service is likely a dev option (not a default option for users);<br>I don't think it should impact code improvements.<br><br>Using a reference to the same struct with a mutex seems better even if just<br>for a simple char... :(</span></p><p class="MsoNormal"> </p><p class="MsoNormal">                I don’t know. I don’t find allocating a structure dynamically when we don’t have to (and we don’t even need it) as a code improvement.</p></div></body></html>