]> git.pond.sub.org Git - empserver/commitdiff
(install_service): Use the compiled in default for location of econfig
authorRon Koenderink <rkoenderink@yahoo.ca>
Sat, 5 Nov 2005 20:05:38 +0000 (20:05 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sat, 5 Nov 2005 20:05:38 +0000 (20:05 +0000)
when the -e is not specified while creating a service.

src/lib/gen/service.c

index e9fded499350cc457097caf0b3208709af543b5a..8e06d783d8881250fee8252c5689b8489a506526 100644 (file)
@@ -44,11 +44,9 @@ install_service(char *program_name, char *service_name, char *config_file)
     HANDLE schSCManager,schService;
     SERVICE_DESCRIPTION sdBuf;
 
-    if (config_file == NULL)
-       config_file = _fullpath(NULL, "econfig", 0);
-
-    _snprintf(&program_name[strlen(program_name)], _MAX_PATH-strlen(program_name), " -e %s",
-       config_file);
+    if (config_file != NULL)
+        _snprintf(&program_name[strlen(program_name)], _MAX_PATH-strlen(program_name), " -e %s",
+           config_file);
 
     if (service_name == NULL)
        service_name = DEFAULT_SERVICE_NAME;