- added new ability to specify the game status listen port

This commit is contained in:
Mark Vejvoda
2012-03-26 06:59:08 +00:00
parent 4f1bee5aea
commit d6619a9cd3
2 changed files with 12 additions and 2 deletions

View File

@@ -3013,6 +3013,14 @@ int glestMain(int argc, char** argv) {
config.setInt("ServerPort",internalPort);
config.setInt("MasterServerExternalPort",externalPort);
config.setInt("FTPServerPort",internalPort+1);
if(paramPartPortsTokens.size() >= 3 && paramPartPortsTokens[2].length() > 0) {
int statusPort = strToInt(paramPartPortsTokens[2]);
printf("Forcing status port# %d\n",statusPort);
config.setInt("ServerAdminPort",statusPort);
}
}
else {
printf("\nInvalid ports specified on commandline [%s] value [%s]\n\n",argv[foundParamIndIndex],(paramPartTokens.size() >= 2 ? paramPartTokens[1].c_str() : NULL));