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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

 

From: Victor Toso
Sent: pondělí 2. května 2016 10:30
To: Lukas Venhoda
Cc: spice-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: [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.

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]