Index: /branches/network/src/lib/network/connection_monitor.cc
===================================================================
--- /branches/network/src/lib/network/connection_monitor.cc	(revision 5797)
+++ /branches/network/src/lib/network/connection_monitor.cc	(revision 5798)
@@ -128,17 +128,17 @@
 void ConnectionMonitor::displayStatistic()
 {
-  PRINT(0)("============================================\n");
-  PRINT(0)("Connection Monitor Network Statistics:\n");
-  PRINT(0)("Total received packets:",totalReceivedPackets);
-  PRINT(0)("Average datarate :\n",averageDatarate);
-  PRINT(0)("Total lost packets:",totalLostPackets);
-  PRINT(0)("Packetloss [%] :\n",totalPacketloss);
-
-  PRINT(0)("Current datarate :\n",currentDatarate);
-  PRINT(0)("Delays of the last few packets :\n");
-  for(int i=1 ;i <= packetToAverage-1;i++)
-    PRINT(0)("%i ",lastFewDelays[i]);
-
-  PRINT(0)("============================================\n");
+//   PRINT(0)("============================================\n");
+//   PRINT(0)("Connection Monitor Network Statistics:\n");
+//   PRINT(0)("Total received packets:",totalReceivedPackets);
+//   PRINT(0)("Average datarate :\n",averageDatarate);
+//   PRINT(0)("Total lost packets:",totalLostPackets);
+//   PRINT(0)("Packetloss [%] :\n",totalPacketloss);
+// 
+//   PRINT(0)("Current datarate :\n",currentDatarate);
+//   PRINT(0)("Delays of the last few packets :\n");
+//   for(int i=1 ;i <= packetToAverage-1;i++)
+//     PRINT(0)("%i ",lastFewDelays[i]);
+// 
+//   PRINT(0)("============================================\n");
 
 }
Index: /branches/network/src/lib/network/network_manager.cc
===================================================================
--- /branches/network/src/lib/network/network_manager.cc	(revision 5797)
+++ /branches/network/src/lib/network/network_manager.cc	(revision 5798)
@@ -167,4 +167,6 @@
     while( stream)
     {
+      printf("NetworkManager::synchronize ");
+      if(stream->isServer()) printf("Server\n"); else printf("Client\n");
       stream->processData();
       stream = (NetworkStream*)(iterator->nextElement());
Index: /branches/network/src/lib/network/network_socket.cc
===================================================================
--- /branches/network/src/lib/network/network_socket.cc	(revision 5797)
+++ /branches/network/src/lib/network/network_socket.cc	(revision 5798)
@@ -218,5 +218,5 @@
   memcpy(outgoingBuffer + outgoingBufferLength, data, nbytes);
   outgoingBufferLength += nbytes;
-
+  
   SDL_mutexV(outgoingBufferMutex);
 
Index: /branches/network/src/lib/network/network_stream.cc
===================================================================
--- /branches/network/src/lib/network/network_stream.cc	(revision 5797)
+++ /branches/network/src/lib/network/network_stream.cc	(revision 5798)
@@ -121,5 +121,4 @@
 
   /* first of all read  data from networkSocket*/
-  while(ret == 0)
   ret = this->networkSocket->readBlock((byte*)upBuffer, PACKAGE_SIZE + sizeof(Header));
   /* error checking: data read? */
Index: /branches/network/src/lib/network/network_stream.h
===================================================================
--- /branches/network/src/lib/network/network_stream.h	(revision 5797)
+++ /branches/network/src/lib/network/network_stream.h	(revision 5798)
@@ -26,4 +26,5 @@
   void init();
   
+  inline bool isServer() { return (this->type == NET_SERVER)? true:false; }
   virtual void processData();
 
@@ -35,4 +36,5 @@
    Synchronizeable* 	    synchronizeables;
    NetworkSocket* networkSocket;
+   int                    type;
 };
 #endif /* _NETWORK_STREAM */
Index: /branches/network/src/subprojects/network/network_unit_test.cc
===================================================================
--- /branches/network/src/subprojects/network/network_unit_test.cc	(revision 5797)
+++ /branches/network/src/subprojects/network/network_unit_test.cc	(revision 5798)
@@ -144,8 +144,11 @@
 
   /* synchronize the data 1 time (increment for longer tests) */
-  for( int i = 0; i < 1; i++) {
+  for( int i = 0; i < 3; i++) {
     nm->synchronize();
   }
 
+  printf("Test finished\n");
+  
+  
   /* delete the network manager again */
   delete nm;
Index: /branches/network/src/subprojects/network/simple_sync.cc
===================================================================
--- /branches/network/src/subprojects/network/simple_sync.cc	(revision 5797)
+++ /branches/network/src/subprojects/network/simple_sync.cc	(revision 5798)
@@ -31,6 +31,7 @@
 {
   this->outLength = 10;
-  this->inLength = 0;
+  this->inLength = 40;
   this->outData = new byte[this->outLength];
+  this->inData = new byte[this->inLength];
   
   for( int i = 0; i < this->outLength; i++)
@@ -48,11 +49,12 @@
 
 /**
- *  write data to NetworkStream
+ *  write data to Synchronizeable
  */
 void SimpleSync::writeBytes(byte* data, int length)
 {
+  if(this->inLength < length)
+    PRINTF(0)("ERROR: local buffer is smaller than the data to receive.\n");
   /* copy the data localy */
-  this->inLength = length;
-  for(int i = 0; i < length; i++)
+  for( int i = 0; i < this->inLength; i++)
   {
     this->inData[i] = data[i];
@@ -64,5 +66,5 @@
 
 /**
- *  read data from NetworkStream
+ *  read data from Synchronizeable
  */
 int SimpleSync::readBytes(byte* data)
@@ -79,5 +81,5 @@
 {
   PRINTF(0)("Write in: |");
-  for(int i = 0; i < inLength; i++)
+  for(int i = 0; i < this->inLength; i++)
   {
     PRINT(0)(" %i ",this->inData[i]);
@@ -89,5 +91,5 @@
 {
   PRINTF(0)("Read out: |");
-  for(int i = 0; i < outLength; i++)
+  for(int i = 0; i < this->outLength; i++)
   {
     PRINT(0)(" %i ",this->outData[i]);
