[Orxonox-commit 671] r3203 - branches/netp5/src/network

scheusso at orxonox.net scheusso at orxonox.net
Sun Jun 21 00:34:33 CEST 2009


Author: scheusso
Date: 2009-06-21 00:34:33 +0200 (Sun, 21 Jun 2009)
New Revision: 3203

Modified:
   branches/netp5/src/network/ClientConnection.cc
   branches/netp5/src/network/Connection.h
   branches/netp5/src/network/ServerConnection.cc
Log:
removed some warnings


Modified: branches/netp5/src/network/ClientConnection.cc
===================================================================
--- branches/netp5/src/network/ClientConnection.cc	2009-06-20 22:27:19 UTC (rev 3202)
+++ branches/netp5/src/network/ClientConnection.cc	2009-06-20 22:34:33 UTC (rev 3203)
@@ -85,6 +85,7 @@
       }
     }
     COUT(1) << "Could not connect to server" << endl;
+    return false;
   }
 
   bool ClientConnection::closeConnection() {

Modified: branches/netp5/src/network/Connection.h
===================================================================
--- branches/netp5/src/network/Connection.h	2009-06-20 22:27:19 UTC (rev 3202)
+++ branches/netp5/src/network/Connection.h	2009-06-20 22:34:33 UTC (rev 3203)
@@ -50,11 +50,11 @@
 
 namespace orxonox
 {
-    const int NETWORK_PORT = 55556;
-    const int NETWORK_MAX_CONNECTIONS = 50;
-    const int NETWORK_WAIT_TIMEOUT = 0;
-    const int NETWORK_DEFAULT_CHANNEL = 0;
-    const int NETWORK_MAX_QUEUE_PROCESS_TIME = 5;
+    const unsigned int NETWORK_PORT = 55556;
+    const unsigned int NETWORK_MAX_CONNECTIONS = 50;
+    const unsigned int NETWORK_WAIT_TIMEOUT = 0;
+    const unsigned int NETWORK_DEFAULT_CHANNEL = 0;
+    const unsigned int NETWORK_MAX_QUEUE_PROCESS_TIME = 5;
 
   class _NetworkExport Connection{
   public:

Modified: branches/netp5/src/network/ServerConnection.cc
===================================================================
--- branches/netp5/src/network/ServerConnection.cc	2009-06-20 22:27:19 UTC (rev 3202)
+++ branches/netp5/src/network/ServerConnection.cc	2009-06-20 22:34:33 UTC (rev 3203)
@@ -55,12 +55,15 @@
     this->host_ = enet_host_create(this->bindAddress_, NETWORK_MAX_CONNECTIONS, 0, 0);
     if ( this->host_ == NULL )
       return false;
+    else
+      return true;
   }
 
   bool ServerConnection::closeListener() {
     this->bListening_=false;
     disconnectClients();
     enet_host_destroy(this->host_);
+    return true;
   }
 
   bool ServerConnection::addPacket(ENetPacket *packet, unsigned int clientID) {




More information about the Orxonox-commit mailing list