From: Thorsten Engel Date: Fri, 20 May 2005 09:32:36 +0000 (+0000) Subject: - hotfix for bug #312 (we don't need /servicehelper on nt) at least I don't know... X-Git-Tag: Release-7.0.0~8754 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7ca2142bffa613a3e49d07cd13bd2c73100dab9d;p=bacula%2Fbacula - hotfix for bug #312 (we don't need /servicehelper on nt) at least I don't know why. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2073 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/win32/winmain.cpp b/bacula/src/filed/win32/winmain.cpp index 5b226d7276..19216ea41b 100755 --- a/bacula/src/filed/win32/winmain.cpp +++ b/bacula/src/filed/win32/winmain.cpp @@ -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 */