[Orxonox-commit 3096] r7790 - in code/branches/presentation2/src: libraries/network orxonox/gamestates

scheusso at orxonox.net scheusso at orxonox.net
Tue Dec 21 21:27:36 CET 2010


Author: scheusso
Date: 2010-12-21 21:27:36 +0100 (Tue, 21 Dec 2010)
New Revision: 7790

Modified:
   code/branches/presentation2/src/libraries/network/LANDiscoverable.cc
   code/branches/presentation2/src/libraries/network/MasterServer.cc
   code/branches/presentation2/src/libraries/network/NetworkPrereqs.h
   code/branches/presentation2/src/orxonox/gamestates/GSServer.cc
Log:
changing landiscoverable port to fix problem when running masterserver and normal server on the same host


Modified: code/branches/presentation2/src/libraries/network/LANDiscoverable.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/LANDiscoverable.cc	2010-12-21 18:10:53 UTC (rev 7789)
+++ code/branches/presentation2/src/libraries/network/LANDiscoverable.cc	2010-12-21 20:27:36 UTC (rev 7790)
@@ -44,7 +44,7 @@
   {
     this->host_ = 0;
     this->bActive_ = false;
-    this->setActivity(true);
+//     this->setActivity(true);
   }
 
   LANDiscoverable::~LANDiscoverable()

Modified: code/branches/presentation2/src/libraries/network/MasterServer.cc
===================================================================
--- code/branches/presentation2/src/libraries/network/MasterServer.cc	2010-12-21 18:10:53 UTC (rev 7789)
+++ code/branches/presentation2/src/libraries/network/MasterServer.cc	2010-12-21 20:27:36 UTC (rev 7790)
@@ -279,7 +279,8 @@
     /* create a host with the above settings (the last two 0 mean: accept 
      * any input/output bandwidth */
     this->server = enet_host_create( &this->address, ORX_MSERVER_MAXCONNS, 
-        ORX_MSERVER_MAXCHANS, 0, 0 );     
+        ORX_MSERVER_MAXCHANS, 0, 0 );
+    assert(this->server);
 
     /* see if creation worked */
     if( !this->server )

Modified: code/branches/presentation2/src/libraries/network/NetworkPrereqs.h
===================================================================
--- code/branches/presentation2/src/libraries/network/NetworkPrereqs.h	2010-12-21 18:10:53 UTC (rev 7789)
+++ code/branches/presentation2/src/libraries/network/NetworkPrereqs.h	2010-12-21 20:27:36 UTC (rev 7790)
@@ -67,7 +67,7 @@
   static const unsigned int CLIENTID_UNKNOWN          = static_cast<unsigned int>(-2);
   extern const char* LAN_DISCOVERY_MESSAGE;
   extern const char* LAN_DISCOVERY_ACK;
-  static const unsigned int LAN_DISCOVERY_PORT          = 55557;
+  static const unsigned int LAN_DISCOVERY_PORT          = 55558;
   static const unsigned int NETWORK_PEER_ID_SERVER      = 0;
   static const unsigned int NETWORK_CHANNEL_DEFAULT     = 0;
   static const unsigned int NETWORK_CHANNEL_UNRELIABLE  = 1;

Modified: code/branches/presentation2/src/orxonox/gamestates/GSServer.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gamestates/GSServer.cc	2010-12-21 18:10:53 UTC (rev 7789)
+++ code/branches/presentation2/src/orxonox/gamestates/GSServer.cc	2010-12-21 20:27:36 UTC (rev 7790)
@@ -33,12 +33,13 @@
 #include "core/Game.h"
 #include "core/GameMode.h"
 #include "network/Server.h"
+#include "network/Connection.h"
 
 namespace orxonox
 {
     DeclareGameState(GSServer, "server", false, false);
 
-    SetCommandLineArgument(port, 55556).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)");
+    SetCommandLineArgument(port, NETWORK_PORT).shortcut("p").information("Network communication port to be used 0-65535 (default: 55556)");
 
     GSServer::GSServer(const GameStateInfo& info)
         : GameState(info)




More information about the Orxonox-commit mailing list