[Spice-devel] [phodav PATCH 3/3 v5] spice-webdavd-windows: Dismount shared folder on service stop

Lukas Venhoda lvenhoda at redhat.com
Mon May 2 09:02:46 UTC 2016


Hi



*From: *Victor Toso <lists at victortoso.com>
*Sent: *pondělí 2. května 2016 10:30
*To: *Lukas Venhoda <lvenhoda at redhat.com>
*Cc: *spice-devel at lists.freedesktop.org
*Subject: *Re: [Spice-devel] [phodav PATCH 3/3 v5] spice-webdavd-windows:
Dismount shared folder on service stop



Hi,

On Mon, May 02, 2016 at 10:05:33AM +0200, Lukas Venhoda wrote:
> Why not use the same struct in both contexts and a mutex to avoid
> concurrency
> problems?
>
> Cheers,
>   toso
>
>             Because ServiceData is not used, when called with
--no-service.
>
>             It won’t be created on stack, and would need to be allocated
> afterwards in run_service, just so that we don’t use gchar*.

--no-service is likely a dev option (not a default option for users);
I don't think it should impact code improvements.

Using a reference to the same struct with a mutex seems better even if just
for a simple char... :(



                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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20160502/83f1caec/attachment-0001.html>


More information about the Spice-devel mailing list