Index: branches/network/src/lib/network/connection_monitor.cc
===================================================================
--- branches/network/src/lib/network/connection_monitor.cc	(revision 7777)
+++ branches/network/src/lib/network/connection_monitor.cc	(revision 7778)
@@ -33,6 +33,4 @@
   this->incomingUnzippedBandWidth = 0;
   this->outgoingUnzippedBandWidth = 0;
-  this->incomingZippedBandWidth = 0;
-  this->outgoingZippedBandWidth = 0;
   this->nIncomingPackets = 0;
   this->nOutgoingPackets = 0;
@@ -64,8 +62,6 @@
   
   for ( int i = 0; i < length; i++ )
-  {
     if ( data[i] == '\0' )
       nZeroBytes++;
-  }
   
   NETPRINTF(n)( "ZEROBYTES: %d (%f%%)\n", nZeroBytes, ((float)100)*nZeroBytes/length );
@@ -86,21 +82,9 @@
   }
       
-  //TODO cleanup list
-//  while ( sentStateTicks.begin()->first <= ackedState )
-//  {
-//    NETPRINTF(n)("removing old state\n");
-//    sentStateTicks.erase( sentStateTicks.begin() );
-//  }
-  
-  NETPRINTF(n)("adsf\n");
+  while ( sentStateTicks.begin()->first <= ackedState )
+    sentStateTicks.erase( sentStateTicks.begin() );
       
-  //TODO cleanup list
-#if 0
   while ( ackDelay.size() > N_PACKETS_FOR_PING )
-  {
-    NETPRINTF(n)("removing old ackdelay\n");
     ackDelay.erase( ackDelay.begin() );
-  }
-#endif
       
   ping = 0;
@@ -128,7 +112,5 @@
   // delete old packets
   while ( packetHistory.begin()->first < tick - MSECS_TO_CALC_BWIDTH )
-  {
     packetHistory.erase( packetHistory.begin() );
-  }
   
   float res = 0.0f;
@@ -149,11 +131,3 @@
 }
 
-/**
- * calculates max packet size you can send now to fit into bandwidth
- * @return 
- */
-int ConnectionMonitor::getMaxPacketSize( )
-{
-}
 
-
Index: branches/network/src/lib/network/connection_monitor.h
===================================================================
--- branches/network/src/lib/network/connection_monitor.h	(revision 7777)
+++ branches/network/src/lib/network/connection_monitor.h	(revision 7778)
@@ -24,12 +24,9 @@
     void processUnzippedOutgoingPacket( byte * data, int length, int stateId );
     void processUnzippedIncomingPacket( byte * data, int length, int stateId, int ackedState );
-
+    void processZippedPacket(  );
     
     void calculatePing();
     
-    //TODO
-    bool hasTimedOut(){ return false; return ( lastPacketTick + SECS_TO_TIMEOUT*1000 < SDL_GetTicks() ) && nIncomingPackets > 0; }
-    
-    int getMaxPacketSize();
+    bool hasTimedOut(){ return ( lastPacketTick + SECS_TO_TIMEOUT*1000 < SDL_GetTicks() ) && nIncomingPackets > 0; }
     
   private:
@@ -43,7 +40,4 @@
     std::map<int,int>   outgoingUnzippedPacketHistory;
     
-    std::map<int,int>   incomingZippedPacketHistory;
-    std::map<int,int>   outgoingZippedPacketHistory;
-    
     std::list<int>      ackDelay;
     int                 ping;
@@ -51,7 +45,4 @@
     float               incomingUnzippedBandWidth;
     float               outgoingUnzippedBandWidth;
-    
-    float               incomingZippedBandWidth;
-    float               outgoingZippedBandWidth;
     
     int                 nIncomingPackets;
Index: branches/network/src/lib/network/handshake.cc
===================================================================
--- branches/network/src/lib/network/handshake.cc	(revision 7777)
+++ branches/network/src/lib/network/handshake.cc	(revision 7778)
@@ -22,6 +22,4 @@
 #include "handshake.h"
 
-#include "network_log.h"
-
 #include <cassert>
 
@@ -43,5 +41,5 @@
   errorString_handler = registerVarId( new SynchronizeableString( &localState.errorString, &remoteState.errorString, "errorString", PERMISSION_ALL ) );
   
-  localState.completed = 0;
+  localState.completed = false;
   localState.error = 0;
   localState.errorString = "";
@@ -52,5 +50,5 @@
   localState.version = _ORXONOX_VERSION;
   
-  remoteState.completed = 0;
+  remoteState.completed = false;
   remoteState.error = 0;
   remoteState.errorString = "";
@@ -78,12 +76,10 @@
       {
         localState.error = 1;
-        localState.completed = 1;
-        PRINTF(0)("orxId: %d:%d", remoteState.orxId, _ORXONOX_ID);
-        localState.errorString = "Seems not to be orxonox!\n";
+        localState.completed = true;
+        localState.errorString = "Seems not to be orxonox!";
         return;
       }
       else
-        if ( remoteState.version -= _ORXONOX_VERSION )
-          localState.completed = 1;
+        localState.completed = true;
     }
      
@@ -93,37 +89,13 @@
       {
         localState.error = 2;
-        localState.completed = 1;
-        PRINTF(0)("version: %d:%d", remoteState.version, _ORXONOX_VERSION);
-        localState.errorString = "Versions of server and client do not match!\n";
+        localState.completed = true;
+        localState.errorString = "Versions of server and client do not match!";
         return;
       }
       else
-        if ( remoteState.orxId == _ORXONOX_ID )
-          localState.completed = 1;
+        localState.completed = true;
     }
     
   }
-  
-  PRINTF(0)("=======================BEGIN=============================\n");
-  for ( std::list<int>::iterator it = id.begin(); it != id.end(); it++ )
-  { 
-    if ( *it == netManId_handler )
-      PRINTF(0)("netManId_handler\n");
-    if ( *it == msgManId_handler )
-      PRINTF(0)("msgManId_handler\n");
-    if ( *it == hostId_handler )
-      PRINTF(0)("hostId_handler\n");
-    if ( *it == completed_handler )
-      PRINTF(0)("completed_handler\n");
-    if ( *it == error_handler )
-      PRINTF(0)("error_handler\n");
-    if ( *it == errorString_handler )
-      PRINTF(0)("errorString_handler\n");
-    if ( *it == orxId_handler )
-      PRINTF(0)("orxId_handler\n");
-    if ( *it == version_handler )
-      PRINTF(0)("version_handler\n");
-  }
-  PRINTF(0)("=========================================================\n");
 }
 
Index: branches/network/src/lib/network/handshake.h
===================================================================
--- branches/network/src/lib/network/handshake.h	(revision 7777)
+++ branches/network/src/lib/network/handshake.h	(revision 7778)
@@ -39,5 +39,4 @@
     inline int        getMessageManagerId(){ return remoteState.messageManagerId; }
     inline void       doReject( std::string reason ){ localState.error = 1; localState.errorString = "the server rejected your connection ["+ reason +"]"; }
-    inline std::string getErrorString(){ return remoteState.errorString; }
     
     virtual void varChangeHandler( std::list<int> & id );
Index: branches/network/src/lib/network/network_game_manager.cc
===================================================================
--- branches/network/src/lib/network/network_game_manager.cc	(revision 7777)
+++ branches/network/src/lib/network/network_game_manager.cc	(revision 7778)
@@ -467,7 +467,4 @@
 {
   /* create new playable for Player*/
-
-  assert ( SharedNetworkData::getInstance()->isGameServer() );
-
   PRINTF(0)("Request for creation: %i\n", userId);
   int uniqueId = this->createEntity(CL_SPACE_SHIP, userId);
Index: branches/network/src/lib/network/network_log.h
===================================================================
--- branches/network/src/lib/network/network_log.h	(revision 7777)
+++ branches/network/src/lib/network/network_log.h	(revision 7778)
@@ -9,5 +9,5 @@
 #include "netdefs.h"
 #include "debug.h"
-
+#include "SDL_net.h"
 
 #include <string>
@@ -44,9 +44,9 @@
     /** @returns a Pointer to the only object of this Class */
     inline static NetworkLog* getInstance(void) { if (!singletonRef) singletonRef = new NetworkLog();  return singletonRef; };
-
+    
     bool listen( int port );
-
+    
     void printfnet( );
-
+    
     void printfn( char * format, ... );
     void printf0( char * format, ... );
@@ -59,12 +59,12 @@
   private:
     NetworkLog();
-
+    
     void acceptNewConnections();
-
+    
     static NetworkLog* singletonRef;
-
+    
     TCPsocket listensock;
     std::list<TCPsocket> sockets;
-
+    
     char buf[NETWORK_LOG_BUFLEN];
 };
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 7777)
+++ branches/network/src/lib/network/network_stream.cc	(revision 7778)
@@ -336,23 +336,17 @@
             this->networkGameManager->setUniqueID( it->second.handshake->getNetworkGameManagerId() );
             MessageManager::getInstance()->setUniqueID( it->second.handshake->getMessageManagerId() );
-
-          }
-          else
-            handleNewClient( it->second.userId );
-
-          PRINTF(0)("handshake finished id=%d\n", it->second.handshake->getNetworkGameManagerId());
+          }
+
+          PRINT(0)("handshake finished id=%d\n", it->second.handshake->getNetworkGameManagerId());
 
           delete it->second.handshake;
           it->second.handshake = NULL;
           
+          handleNewClient( it->second.userId );
         }
         else
         {
-          PRINTF(1)("handshake failed: %s!\n", it->second.handshake->getErrorString().c_str());
+          PRINT(1)("handshake failed!\n");
           it->second.socket->disconnectServer();
-          it->second.socket = NULL;
-          
-          delete it->second.handshake;
-          it->second.handshake = NULL;
         }
       }
@@ -426,15 +420,9 @@
     }
     
-    NETPRINTF(0)("adsf\n");
-    
     assert( Converter::intToByteArray( offset, buf, INTSIZE ) == INTSIZE );
     
-    NETPRINTF(0)("adsf %d\n", offset);
-    
     assert( peer->second.socket->writePacket( buf, offset ) );
     
-    NETPRINTF(0)("adsf\n");
-    
-    //peer->second.connectionMonitor->processUnzippedOutgoingPacket( buf, offset, currentState );
+    peer->second.connectionMonitor->processUnzippedOutgoingPacket( buf, offset, currentState );
     
     NETPRINTF(n)("send packet: %d userId = %d\n", offset, peer->second.userId);
@@ -524,5 +512,4 @@
           if ( !peers[peer->second.userId].isServer )
           {
-            PRINTF(0)("Client %d is no server: dont accept new synchronizeable\n", peer->second.userId);
             offset += syncDataLength;
             continue;
@@ -583,5 +570,5 @@
       }
       
-      //peer->second.connectionMonitor->processUnzippedIncomingPacket( buf, offset, currentState, ackedState );
+      peer->second.connectionMonitor->processUnzippedIncomingPacket( buf, offset, currentState, ackedState );
     
       peer->second.lastAckedState = ackedState;
@@ -610,6 +597,4 @@
 void NetworkStream::cleanUpOldSyncList( )
 {
-  //TODO dont return do something
-  return;
   int now = SDL_GetTicks();
   
Index: branches/network/src/lib/network/udp_socket.cc
===================================================================
--- branches/network/src/lib/network/udp_socket.cc	(revision 7777)
+++ branches/network/src/lib/network/udp_socket.cc	(revision 7778)
@@ -17,5 +17,4 @@
 #include "udp_server_socket.h"
 
-#include "network_log.h"
 
 void UdpSocket::init( )
@@ -152,42 +151,26 @@
 bool UdpSocket::writePacket( byte * data, int length )
 {
-  NETPRINTF(0)("adsf\n");
   if ( serverSocket )
   {
-    NETPRINTF(0)("adsf\n");
     NetworkPacket networkPacket;
     networkPacket.length = length;
     networkPacket.data = data;
-    NETPRINTF(0)("adsf\n");
     if ( !serverSocket->sendPacket( networkPacket, this->userId ) )
     {
-      NETPRINTF(0)("adsf\n");
       bOk = false;
       return false;
     }
     else
-    {
-      NETPRINTF(0)("adsf\n");
       return true;
-    }
-    NETPRINTF(0)("adsf\n");
   }
   else
   {
-    if ( !socket )
-      return false;
-    
-    NETPRINTF(0)("adsf\n");
     assert( length <= packet->maxlen );
     
-    NETPRINTF(0)("adsf\n");
     memcpy( packet->data, data, length );
-    NETPRINTF(0)("adsf\n");
     packet->len = length;
     
-    NETPRINTF(0)("adsf\n");
     if ( SDLNet_UDP_Send( socket, 1, packet) == 0 )
     {
-      NETPRINTF(0)("adsf\n");
       PRINTF(1)("SDLNet_UDP_Send: %s\n", SDLNet_GetError());
       bOk = false;
@@ -195,8 +178,6 @@
     }
     
-    NETPRINTF(0)("adsf\n");
     return true;
   }
-  NETPRINTF(0)("adsf\n");
 }
 
