[phodav] spice-webdavd-windows: Option to run without service
- From: Victor Toso de Carvalho <victortoso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [phodav] spice-webdavd-windows: Option to run without service
- Date: Thu, 24 Mar 2016 10:06:41 +0000 (UTC)
commit ef284599c33abdb202fe28f6718bc601b9d98858
Author: Lukas Venhoda <lvenhoda redhat com>
Date: Thu Mar 17 14:47:48 2016 +0100
spice-webdavd-windows: Option to run without service
Adds --no-service argument.
This runs the program normally, instead of running as Windows service.
Acked-by: Marc-André Lureau <mlureau redhat com>
Acked-by: Victor Toso <victortoso redhat com>
spice/spice-webdavd.c | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
index b3fd1ea..f9c5cf1 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;
@@ -852,6 +856,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 }
};
@@ -910,7 +919,7 @@ main (int argc, char *argv[])
{
{ (char *)"spice-webdavd", service_main }, { NULL, NULL }
};
- if (!getenv("DEBUG"))
+ if (!no_service && !getenv("DEBUG"))
{
if (!StartServiceCtrlDispatcher (service_table))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]