Index: source/ariba/utility/transport/StreamTransport/StreamTransport.cpp
===================================================================
--- source/ariba/utility/transport/StreamTransport/StreamTransport.cpp	(revision 12060)
+++ source/ariba/utility/transport/StreamTransport/StreamTransport.cpp	(revision 12773)
@@ -366,5 +366,6 @@
         parent(parent),
         out_queues(8), //TODO How much priorities shall we have?
-        sending(false)
+        sending(false),
+        MAGIC_NUMBER(424242)
 {
         header.length = 0;
@@ -594,10 +595,30 @@
     bool restart_sending = false;
     
+	// FIXME Mario DEBUGGING  --  copy !!
+	reboost::shared_buffer_t buff = packet.linearize();
+	reboost::message_t msg;
+	msg.push_back(buff);
+	assert ( msg.MAGIC_NUMBER == 421337 );
+	// [ DEBUGGING ]
+	
+	
     // enqueue packet  [locked]
     {
-        unique_lock(out_queues_lock);
-        
-        assert( priority < out_queues.size() );
-        out_queues[priority].push(packet);
+        boost::mutex::scoped_lock lock(out_queues_lock);
+		
+		int debuggingA = out_queues[priority].size();
+// 		assert ( debuggingA < 1000 ); // XXX
+		
+		assert ( this->valid );
+        
+        assert( priority < out_queues.size() );  // NOTE: actual assert, not in context with the extended debugging..
+//         out_queues[priority].push(packet);  // FIXME Mario
+		out_queues[priority].push(msg);		   // FIXME Mario
+		
+		// XXX
+		int debuggingB = out_queues[priority].size();
+		int magic = out_queues[priority].back().MAGIC_NUMBER;
+		assert ( debuggingB == debuggingA + 1 );
+		assert ( magic == 421337 );
         
         if ( ! sending )
@@ -622,11 +643,27 @@
     bool found = false;
 
+	// XXX Mario: Debugging
+	if ( ! this->valid )
+	{
+		this->sending = false;
+		cout << "/// StreamConnection::send_next_package() on INVALID STREAM" << endl;
+		return;
+	}
+	
     // find packet with highest priority  [locked]
     {
-        unique_lock(out_queues_lock);
+        boost::mutex::scoped_lock lock(out_queues_lock);
+		
+		assert ( this->valid ); // XXX TODO ggf. in if (valid) Ã€ndern...
+		assert ( this->sending );
+		assert ( this->MAGIC_NUMBER == 424242 );
+		assert ( this->out_queues.size() == 8 );
         
         for ( vector<OutQueue>::iterator it = out_queues.begin();
                 it != out_queues.end(); it++ )
         {
+			int debugging = it->size();  // XXX debugging
+// 			assert ( debugging < 1000 );
+			
             if ( !it->empty() )
             {
Index: source/ariba/utility/transport/StreamTransport/StreamTransport.hpp
===================================================================
--- source/ariba/utility/transport/StreamTransport/StreamTransport.hpp	(revision 12060)
+++ source/ariba/utility/transport/StreamTransport/StreamTransport.hpp	(revision 12773)
@@ -64,5 +64,11 @@
         StreamConnection(boost::asio::io_service& io_service, StreamTransportPtr parent);
         
-        virtual ~StreamConnection() {}
+        virtual ~StreamConnection()
+		{
+			// XXX MARIO Debugging
+			std::cout << "/// ~StreamConnection(): " << this << ", SENDING: " << this->sending << ", VALID: " << this->valid << std::endl;
+			
+			assert ( this->valid == false );
+		}
         
         /// Inherited from transport_connection
@@ -127,4 +133,7 @@
         shared_buffer_t buffy;
         
+		
+		// XXX Mario: Debugging
+		const int MAGIC_NUMBER;
     private:
         std::vector<ariba::utility::LinkID*> communication_links;
