[phodav,08/13] spice-win: define SERVICE_NAME

Submitted by Jakub Janků on May 23, 2019, 8:37 a.m.

Details

Message ID 20190523083725.1554-9-jjanku@redhat.com
State New
Headers show
Series "Miscellaneous series" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Jakub Janků May 23, 2019, 8:37 a.m.
Signed-off-by: Jakub Janků <jjanku@redhat.com>
---
 spice/spice-webdavd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

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"))
     {

Comments

On Thu, May 23, 2019 at 10:37 AM Jakub Janků <jjanku@redhat.com> wrote:
>
> Signed-off-by: Jakub Janků <jjanku@redhat.com>

ack

> ---
>  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
>
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel