[Spice-devel] [phodav PATCH] spice-webdavd: Don't show client folder, when sharing disabled
Victor Toso
victortoso at redhat.com
Wed Jul 22 08:05:25 PDT 2015
Maybe, the right way with Phodav is by using gnome bugzilla
https://bugzilla.gnome.org/enter_bug.cgi?product=phodav
Cheers,
Victor Toso
On Wed, Jul 22, 2015 at 04:51:59PM +0200, Lukas Venhoda wrote:
> After enabling shared folder once, the Spice client folder stays in Nautilus,
> until the spice-webdavd service si restarted.
>
> This patch makes sure, that Spice client folder is disabled when sharing
> is disabled, or the client disconnects.
> ---
> spice/spice-webdavd.c | 19 ++++++++++++++-----
> 1 file changed, 14 insertions(+), 5 deletions(-)
>
> diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
> index 742f9c9..7b199a3 100644
> --- a/spice/spice-webdavd.c
> +++ b/spice/spice-webdavd.c
> @@ -222,6 +222,7 @@ static HANDLE port_handle;
> #endif
>
> static void start_mux_read (GInputStream *istream);
> +static void mdns_unregister_service (void);
>
> static void
> quit (int sig)
> @@ -466,6 +467,7 @@ end:
> g_clear_error (&error);
> }
>
> + mdns_unregister_service();
> quit (-3);
> }
>
> @@ -614,6 +616,17 @@ end:
> }
>
> static void
> +mdns_unregister_service (void)
> +{
> + if (mdns_group)
> + {
> + g_debug ("MDNS client disconected");
> + ga_entry_group_reset (mdns_group, NULL);
> + mdns_service = 0;
> + }
> +}
> +
> +static void
> mdns_state_changed (GaClient *client, GaClientState state, gpointer user_data)
> {
> switch (state)
> @@ -630,11 +643,7 @@ mdns_state_changed (GaClient *client, GaClientState state, gpointer user_data)
> case GA_CLIENT_STATE_S_COLLISION:
> case GA_CLIENT_STATE_S_REGISTERING:
> g_message ("MDNS collision");
> - if (mdns_group)
> - {
> - ga_entry_group_reset (mdns_group, NULL);
> - mdns_service = 0;
> - }
> + mdns_unregister_service();
> break;
>
> default:
> --
> 2.4.3
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
More information about the Spice-devel
mailing list