[Spice-devel] [PATCH phodav 08/13] spice-win: define SERVICE_NAME

Jakub Janků jjanku at redhat.com
Thu May 23 08:37:20 UTC 2019


Signed-off-by: Jakub Janků <jjanku at redhat.com>
---
 spice/spice-webdavd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/spice/spice-webdavd.c b/spice/spice-webdavd.c
index 681e909..c77c870 100644
--- a/spice/spice-webdavd.c
+++ b/spice/spice-webdavd.c
@@ -31,6 +31,7 @@
 #include <gio/gwin32inputstream.h>
 #include <gio/gwin32outputstream.h>
 #include <windows.h>
+#define SERVICE_NAME "spice-webdavd"
 #endif
 
 #ifdef WITH_AVAHI
@@ -1062,7 +1063,7 @@ service_main (DWORD argc, TCHAR *argv[])
   g_mutex_init(&service_data.mutex);
 
   service_status_handle =
-    RegisterServiceCtrlHandlerEx ("spice-webdavd", service_ctrl_handler, &service_data);
+    RegisterServiceCtrlHandlerEx (SERVICE_NAME, service_ctrl_handler, &service_data);
 
   g_return_if_fail (service_status_handle != 0);
 
@@ -1154,7 +1155,7 @@ main (int argc, char *argv[])
 
   SERVICE_TABLE_ENTRY service_table[] =
     {
-      { (char *)"spice-webdavd", service_main }, { NULL, NULL }
+      { SERVICE_NAME, service_main }, { NULL, NULL }
     };
   if (!no_service && !getenv("DEBUG"))
     {
-- 
2.21.0



More information about the Spice-devel mailing list