Re: [phodav PATCH 2/2] spice-webdavd: Option to run without service on Windows

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

 



hi

----- Original Message -----
> Adds --no-service argument.
> This runs the program normally, instead of running as Windows service.
> ---
>  spice/spice-webdavd.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
> index 368bb44..c5f39f7 100644
> --- a/spice/spice-webdavd.c
> +++ b/spice/spice-webdavd.c
> @@ -563,6 +563,10 @@ incoming_callback (GSocketService    *service,
> 
>  static int port;
> 
> +#ifdef G_OS_WIN32
> +static gboolean no_service;
> +#endif
> +
>  #ifdef WITH_AVAHI
>  static GaClient *mdns_client;
>  static GaEntryGroup *mdns_group;
> @@ -855,6 +859,11 @@ static GOptionEntry entries[] = {
>    { "port", 'p', 0,
>      G_OPTION_ARG_INT, &port,
>      "Port to listen on", NULL },
> +#ifdef G_OS_WIN32
> +  { "no-service", 0, 0,
> +    G_OPTION_ARG_NONE, &no_service,
> +    "Don't start as a service", NULL },
> +#endif
>    { NULL }
>  };
> 
> @@ -913,7 +922,7 @@ main (int argc, char *argv[])
>      {
>        { (char *)"spice-webdavd", service_main }, { NULL, NULL }
>      };
> -  if (!getenv("DEBUG"))
> +  if (!no_service && !getenv("DEBUG"))
>      {

I forgot that I was actually using DEBUG=1 to debug from command line, but a --no-service argument helps too, so ack
 
>        if (!StartServiceCtrlDispatcher (service_table))
>          {
> --
> 2.4.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]