]> git.sur5r.net Git - bacula/bacula/commitdiff
- hotfix for bug #312 (we don't need /servicehelper on nt) at least I don't know...
authorThorsten Engel <thorsten.engel@matrix-computer.com>
Fri, 20 May 2005 09:32:36 +0000 (09:32 +0000)
committerThorsten Engel <thorsten.engel@matrix-computer.com>
Fri, 20 May 2005 09:32:36 +0000 (09:32 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2073 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/src/filed/win32/winmain.cpp

index 5b226d72762a1c788336420b02747e28343a2b87..19216ea41b752353a9685b22f0d93fa43a19c854 100755 (executable)
@@ -47,6 +47,7 @@ DWORD           mainthreadId;
 
 /* Imported variables */
 extern DWORD    g_servicethread;
+extern DWORD    g_platform_id;
 
 #define MAX_COMMAND_ARGS 100
 static char *command_args[MAX_COMMAND_ARGS] = {"bacula-fd", NULL};
@@ -165,6 +166,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
 
       /* Now check for command-line arguments */
 
+      /* /service helper - probably only needed on win9x */
+      if (strncmp(&szCmdLine[i], BaculaRunServiceHelper, strlen(BaculaRunServiceHelper)) == 0
+          && g_platform_id == VER_PLATFORM_WIN32_NT) {
+         /* exit with result "okay" */
+         return 0;          
+      }
+
       /* /service start service */
       if (strncmp(&szCmdLine[i], BaculaRunService, strlen(BaculaRunService)) == 0) {
          /* Run Bacula as a service */