mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11502] Fixed windows service run after adding posix daemon support
This commit is contained in:
parent
eb61995f7e
commit
9c65b04f5b
3 changed files with 25 additions and 3 deletions
|
|
@ -87,12 +87,14 @@ extern int main(int argc, char **argv)
|
|||
ACE_Get_Opt cmd_opts(argc, argv, options);
|
||||
cmd_opts.long_option("version", 'v');
|
||||
|
||||
#ifndef WIN32 // need call before options for posix daemon
|
||||
if (!sConfig.SetSource(cfg_file))
|
||||
{
|
||||
sLog.outError("Could not find configuration file %s.", cfg_file);
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int option;
|
||||
while ((option = cmd_opts()) != EOF)
|
||||
|
|
@ -161,6 +163,15 @@ extern int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef WIN32 // need call after options for windows service
|
||||
if (!sConfig.SetSource(cfg_file))
|
||||
{
|
||||
sLog.outError("Could not find configuration file %s.", cfg_file);
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
sLog.outString( "%s [world-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) );
|
||||
sLog.outString( "<Ctrl-C> to stop.\n\n" );
|
||||
|
||||
|
|
|
|||
|
|
@ -96,14 +96,16 @@ extern int main(int argc, char **argv)
|
|||
ACE_Get_Opt cmd_opts(argc, argv, options);
|
||||
cmd_opts.long_option("version", 'v');
|
||||
|
||||
int option;
|
||||
|
||||
#ifndef WIN32 // need call before options for posix daemon
|
||||
if (!sConfig.SetSource(cfg_file))
|
||||
{
|
||||
sLog.outError("Could not find configuration file %s.", cfg_file);
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int option;
|
||||
|
||||
while ((option = cmd_opts()) != EOF)
|
||||
{
|
||||
|
|
@ -171,6 +173,15 @@ extern int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef WIN32 // need call after options for windows service
|
||||
if (!sConfig.SetSource(cfg_file))
|
||||
{
|
||||
sLog.outError("Could not find configuration file %s.", cfg_file);
|
||||
Log::WaitBeforeContinueIfNeed();
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
sLog.Initialize();
|
||||
|
||||
sLog.outString( "%s [realm-daemon]", _FULLVERSION(REVISION_DATE,REVISION_TIME,REVISION_NR,REVISION_ID) );
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11501"
|
||||
#define REVISION_NR "11502"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue