Index: source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp
===================================================================
--- source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp	(revision 4853)
+++ source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.cpp	(revision 4866)
@@ -59,4 +59,5 @@
 use_logging_cpp(PeriodicBroadcast);
 const long PeriodicBroadcast::timerinterval = 1000;
+const long PeriodicBroadcast::servicetimeout = 3000;
 const unsigned int PeriodicBroadcast::serverport_v4 = 5634;
 const unsigned int PeriodicBroadcast::serverport_v6 = 5636;
@@ -130,4 +131,59 @@
 void PeriodicBroadcast::updateRemoteServices(){
 
+	// cleanup the services that timed out
+	// so they are seen of as new after timeout
+	{
+		boost::mutex::scoped_lock lock( remoteServicesMutex );
+		bool deleted;
+
+		do {
+			deleted = false;
+
+			ServiceList::iterator i = remoteServices.begin();
+			ServiceList::iterator iend = remoteServices.end();
+
+			for( ; i != iend; i++ ){
+
+				if( time(NULL) > (i->second.lastseen + servicetimeout) ){
+					remoteServices.erase( i );
+					deleted = true;
+					break;
+				}
+			}
+
+		}while(deleted);
+	}
+
+	// check if we received new services:
+	// check remoteServices against newRemoteServices
+	{
+		boost::mutex::scoped_lock lock( newRemoteServicesMutex );
+		typedef std::pair<string,Service> mapitem;
+
+		BOOST_FOREACH( mapitem item, newRemoteServices ){
+
+			string name = item.first;
+			Service service = item.second;
+
+			ServiceList::iterator i = remoteServices.find( name );
+			if( i != remoteServices.end() ) {
+				// update the item lastseen time
+				i->second.lastseen = service.lastseen;
+				continue;
+			}
+
+			{
+				// insert the new item as new, lastseen has been set in the
+				// receive function, as this timer only runs in intervals
+				boost::mutex::scoped_lock lock2( remoteServicesMutex );
+				remoteServices.insert( std::make_pair(name, service) );
+			}
+
+			callback->onBootstrapServiceFound(name, service.info1, service.info2, service.info3);
+		}
+
+		// we have checked and transfered all new items
+		newRemoteServices.clear();
+	}
 }
 
Index: source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h
===================================================================
--- source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h	(revision 4853)
+++ source/ariba/utility/bootstrap/modules/periodicbroadcast/PeriodicBroadcast.h	(revision 4866)
@@ -44,4 +44,5 @@
 #include <map>
 #include <string>
+#include <ctime>
 #include <iostream>
 #include <boost/asio.hpp>
@@ -56,4 +57,5 @@
 using std::map;
 using std::string;
+using std::cout;
 using boost::asio::ip::udp;
 
@@ -83,5 +85,6 @@
 	void updateRemoteServices();
 
-	static const long timerinterval;
+	static const long timerinterval; // used to send out updates on our services and check for new services
+	static const long servicetimeout; // timeout after that a service is dead when we did not receive updates
 	static const unsigned int serverport_v4;
 	static const unsigned int serverport_v6;
@@ -92,4 +95,9 @@
 		string info2;
 		string info3;
+		time_t lastseen;
+
+		_Service()
+			: name(""), info1(""), info2(""), info3(""), lastseen(0){
+		}
 	} Service;
 
@@ -133,6 +141,8 @@
 			Data data = data_serialize( msg, DEFAULT_V );
 			uint8_t* pnt = data.getBuffer();
-			size_t len = data.getLength();
+			size_t len = data.getLength() / 8;
 			boost::system::error_code ignored_error;
+
+			cout << "-----------> sending out " << data << std::endl;
 
 			{
@@ -172,4 +182,6 @@
 				data_deserialize( msg, data );
 
+				cout << "-----------> received " << data << std::endl;
+
 				{ // insert new found service
 					boost::mutex::scoped_lock( *servicesmutex );
@@ -182,4 +194,5 @@
 					s.info2 = msg.getInfo2();
 					s.info3 = msg.getInfo3();
+					s.lastseen = time(NULL);
 					services->insert( std::make_pair(msg.getName(), s) );
 				}
