diff --git a/src/remote/os/win32/srvr_w32.cpp b/src/remote/os/win32/srvr_w32.cpp index 50b9932952..1d19343132 100644 --- a/src/remote/os/win32/srvr_w32.cpp +++ b/src/remote/os/win32/srvr_w32.cpp @@ -202,15 +202,9 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs, return STARTUP_ERROR; // see /jrd/common.h } -#ifdef SUPERSERVER - server_flag = SRVR_multi_client; -#else - server_flag = 0; -#endif + server_flag = Config::getMultiClientServer() ? SRVR_multi_client : 0; -#ifdef SUPERSERVER SetProcessAffinityMask(GetCurrentProcess(), static_cast(Config::getCpuAffinityMask())); -#endif protocol_inet[0] = 0; protocol_wnet[0] = 0; @@ -219,7 +213,6 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs, const HANDLE connection_handle = parse_args(lpszArgs, &server_flag); -#ifdef SUPERSERVER // get priority class from the config file int priority = Config::getProcessPriorityLevel(); @@ -235,7 +228,6 @@ int WINAPI WinMain(HINSTANCE hThisInst, HINSTANCE /*hPrevInst*/, LPSTR lpszArgs, else if (priority < 0) { SetPriorityClass(GetCurrentProcess(), IDLE_PRIORITY_CLASS); } -#endif TEXT mutex_name[MAXPATHLEN]; fb_utils::snprintf(mutex_name, sizeof(mutex_name), SERVER_MUTEX, instance); @@ -558,7 +550,6 @@ static HANDLE parse_args(LPCSTR lpszArgs, USHORT* pserver_flag) *pserver_flag |= (SRVR_debug | SRVR_non_service); break; -#ifndef SUPERSERVER case 'H': while (*p && *p == ' ') p++; @@ -605,7 +596,6 @@ static HANDLE parse_args(LPCSTR lpszArgs, USHORT* pserver_flag) } } break; -#endif case 'I': *pserver_flag |= SRVR_inet;