Index: branches/network/src/lib/network/network_manager.cc
===================================================================
--- branches/network/src/lib/network/network_manager.cc	(revision 5804)
+++ branches/network/src/lib/network/network_manager.cc	(revision 5805)
@@ -139,5 +139,5 @@
 NetworkStream& NetworkManager::createServer(Synchronizeable& sync, unsigned int port)
 {
-  printf("Create a new server socket, liestening on port %u...\n", port);
+  PRINTF(0)("Create a new server socket\n");
   /* creating a new network stream, it will register itself automaticaly to the class list */
   NetworkStream* netStream = new NetworkStream(sync, port, NET_SERVER);
Index: branches/network/src/lib/network/network_protocol.cc
===================================================================
--- branches/network/src/lib/network/network_protocol.cc	(revision 5804)
+++ branches/network/src/lib/network/network_protocol.cc	(revision 5805)
@@ -68,4 +68,7 @@
     return -1;
 
+//   for(int i = 0; i < length; i++)
+//     printf("send byte[%i]=%u\n", i, data[i]);
+
   //Create space for the header
   for( int i = length - 1; i >= 0; i--)
@@ -102,4 +105,7 @@
   h.data = data;
 
+//   for(int i = 0; i < length; i++)
+//     printf("recS byte[%i]=%u\n", i, data[i]);
+
   //Remove header
   for (int i = headerLength; i < length; i++)
Index: branches/network/src/lib/network/network_socket.cc
===================================================================
--- branches/network/src/lib/network/network_socket.cc	(revision 5804)
+++ branches/network/src/lib/network/network_socket.cc	(revision 5805)
@@ -163,5 +163,4 @@
   tcpSocket = NULL;
   SDL_mutexV(socketMutex);
-
 }
 
@@ -220,4 +219,5 @@
   SDL_mutexV(outgoingBufferMutex);
 
+
   return nbytes;
 #else
@@ -395,5 +395,5 @@
 #undef min
 
-    //printf("thread_write nbytes=%d listening=%d\n", nbytestowrite, (int)self->_isListening);
+//     printf("thread_write nbytes=%d listening=%d\n", nbytestowrite, (int)self->_isListening);
 
     //if buffer is full
@@ -431,4 +431,5 @@
   }
 
+  printf("QUIT WRITE THREAD\n");
   return 0;
 }
Index: branches/network/src/lib/network/network_stream.cc
===================================================================
--- branches/network/src/lib/network/network_stream.cc	(revision 5804)
+++ branches/network/src/lib/network/network_stream.cc	(revision 5805)
@@ -86,5 +86,7 @@
  networkSocket->disconnectServer();
 
- delete networkSocket;
+ if( this->networkSocket)
+   delete networkSocket;
+
  delete connectionMonitor;
  delete networkProtocol;
@@ -107,9 +109,7 @@
                                             *(this->synchronizeables), 12);
 
-  printf("created header: data packet wights: %i bytes\n", ret);
   /* pass the data to the network socket */
   ret = this->networkSocket->writeBytes((byte*)downBuffer, ret);
   /* check if there was an error */
-  printf("NetworkSocket: sent %i bytes\n", ret);
   if( ret == -1) { PRINTF(0)("Error in writing data to the NetworkSocket\n");}
 
@@ -122,5 +122,4 @@
   ret = this->networkSocket->readBlock((byte*)upBuffer, 11/* this is very bad: hard coded packet sizes! */);
   /* error checking: data read? */
-  printf("NetworkSocket: received %i bytes\n", ret);
   if( ret != 11 /*PACKAGE_SIZE + sizeof(Header)*/) { PRINTF(0)("Error while reading data from the NetworkSocket. Skipping further work\n");}
   else
Index: branches/network/src/subprojects/network/network_unit_test.cc
===================================================================
--- branches/network/src/subprojects/network/network_unit_test.cc	(revision 5804)
+++ branches/network/src/subprojects/network/network_unit_test.cc	(revision 5805)
@@ -143,8 +143,11 @@
   if(error == -1) printf("\n\nerror on address resolution, program inconsistancy\n\n");
   nm->establishConnection(ip, *clientSync);
+  SDL_Delay(1000);
 
   /* synchronize the data 1 time (increment for longer tests) */
-  for( int i = 0; i < 2; i++) {
+  for( int i = 0; i < 3; i++) {
     nm->synchronize();
+    /* simulate the network delay */
+    SDL_Delay(50);
   }
 
Index: branches/network/src/subprojects/network/simple_sync.cc
===================================================================
--- branches/network/src/subprojects/network/simple_sync.cc	(revision 5804)
+++ branches/network/src/subprojects/network/simple_sync.cc	(revision 5805)
@@ -66,4 +66,5 @@
   if(this->inLength < length)
     PRINTF(0)("ERROR: local buffer is smaller than the data to receive.\n");
+
   /* copy the data localy */
   for( int i = 0; i < length; i++)
@@ -82,6 +83,11 @@
 {
   PRINTF(0)("SimpleSync: sent %i bytes of data\n", this->outLength);
+
   /* write the test message */
-  data = this->outData;
+  for( int i = 0; i < this->outLength; i++)
+  {
+    data[i] = this->outData[i];
+  }
+
   /* debug msg */
   this->readDebug();
@@ -93,5 +99,5 @@
 void SimpleSync::writeDebug()
 {
-  PRINTF(0)("Write in: |");
+  PRINTF(0)("Write in bytes: \t(0 <-) |");
   for(int i = 0; i < this->recLength; i++)
   {
@@ -104,5 +110,5 @@
 void SimpleSync::readDebug()
 {
-  PRINTF(0)("Read out bytes: |");
+  PRINTF(0)("Read out bytes: \t(0 ->) |");
   for(int i = 0; i < this->outLength; i++)
   {
