summaryrefslogtreecommitdiffstats
path: root/service-win32/openvpnserv.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-12 20:31:43 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-05-12 20:31:43 +0000
commit1bda73a7b0f45a2502ae93e33e30b98152d893f3 (patch)
tree7bdf8f59ec2c6443a071a0217f78f8a999596030 /service-win32/openvpnserv.c
parent9ca8f3cf77b7d5ec5956777c2f2e8807bdbcca24 (diff)
downloadopenvpn-1bda73a7b0f45a2502ae93e33e30b98152d893f3.tar.gz
openvpn-1bda73a7b0f45a2502ae93e33e30b98152d893f3.tar.xz
openvpn-1bda73a7b0f45a2502ae93e33e30b98152d893f3.zip
Moved branch into official BETA21 position.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@2959 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'service-win32/openvpnserv.c')
-rwxr-xr-xservice-win32/openvpnserv.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/service-win32/openvpnserv.c b/service-win32/openvpnserv.c
index 76323ca..6cdce26 100755
--- a/service-win32/openvpnserv.c
+++ b/service-win32/openvpnserv.c
@@ -33,6 +33,11 @@
* This code is designed to be built with the mingw compiler.
*/
+#ifdef _MSC_VER
+#include "config-win32.h"
+#else
+#include "config.h"
+#endif
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
@@ -65,13 +70,13 @@ struct security_attributes
* Control Manager which will cause an asynchronous call
* of ServiceStop below.
*/
-#define EXIT_EVENT_NAME PRODUCT_UNIX_NAME "_exit_1"
+#define EXIT_EVENT_NAME PACKAGE "_exit_1"
/*
* Which registry key in HKLM should
* we get config info from?
*/
-#define REG_KEY "SOFTWARE\\" PRODUCT_NAME
+#define REG_KEY "SOFTWARE\\" PACKAGE_NAME
static HANDLE exit_event = NULL;
@@ -398,7 +403,7 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv)
mysnprintf (log_path, "%s\\%s", log_dir, log_file);
/* construct command line */
- mysnprintf (command_line, PRODUCT_UNIX_NAME " --service %s 1 --config \"%s\"",
+ mysnprintf (command_line, PACKAGE " --service %s 1 --config \"%s\"",
EXIT_EVENT_NAME,
find_obj.cFileName);
@@ -406,7 +411,7 @@ VOID ServiceStart (DWORD dwArgc, LPTSTR *lpszArgv)
be inherited. */
if (!init_security_attributes_allow_all (&sa))
{
- MSG (M_SYSERR, "InitializeSecurityDescriptor start_" PRODUCT_UNIX_NAME " failed");
+ MSG (M_SYSERR, "InitializeSecurityDescriptor start_" PACKAGE " failed");
goto finish;
}