Index: /source/ariba/communication/EndpointDescriptor.cpp
===================================================================
--- /source/ariba/communication/EndpointDescriptor.cpp	(revision 3699)
+++ /source/ariba/communication/EndpointDescriptor.cpp	(revision 3705)
@@ -112,11 +112,41 @@
 bool EndpointDescriptor::operator==(const EndpointDescriptor& rh) const {
 
-	if( locator != NULL && rh.locator != NULL )
-		return ( locator->operator==(*rh.locator) );
+	if( isUnspecified() && rh.isUnspecified() ) {
 
-	if( locator != rh.locator )
+		// both unspec bit set
+		return true;
+
+	} else if( (!isUnspecified()) && (!rh.isUnspecified()) ) {
+
+		//
+		// both are valid, check locators
+		//
+
+		if( locator == NULL && rh.locator == NULL ){
+
+			// both locators are invalid, ok true
+			return true;
+
+		} else if( locator == NULL ^ rh.locator == NULL ) {
+
+			// one locator is invalid, the other not, false
+			return false;
+
+		} else {
+
+			// both locators are valid, compare
+			assert( locator != NULL && rh.locator != NULL );
+			return ( locator->operator==(*rh.locator) );
+
+		}
+
+	} else {
+
+		// one is unspec, the other not
+		assert( isUnspecified() ^ rh.isUnspecified() );
 		return false;
 
-	return (isUnspec == rh.isUnspec);
+	}
+
 }
 
Index: /source/ariba/communication/EndpointDescriptor.h
===================================================================
--- /source/ariba/communication/EndpointDescriptor.h	(revision 3699)
+++ /source/ariba/communication/EndpointDescriptor.h	(revision 3705)
@@ -100,5 +100,10 @@
 
 sznBeginDefault( ariba::communication::EndpointDescriptor, X ) {
-	X && VO(locator);
+	uint8_t unspec = isUnspec;
+
+	X && unspec && VO(locator);
+
+	// when deserializing reset unspec flag
+	if (X.isDeserializer()) isUnspec = unspec;
 } sznEnd();
 
Index: /source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- /source/ariba/overlay/BaseOverlay.cpp	(revision 3699)
+++ /source/ariba/overlay/BaseOverlay.cpp	(revision 3705)
@@ -820,4 +820,7 @@
 		if( iface->onLinkRequest(sourcenode) ){
 
+			logging_debug("link " << link.toString() <<
+					" has been accepted by service " << service.toString());
+
 			// call the notification functions
 			iface->onLinkUp( link, sourcenode );
@@ -825,4 +828,8 @@
 
 		} else {
+
+			logging_debug("link " << link.toString() <<
+								" has been denied by service " << service.toString() << ", dropping link");
+
 			// prevent onLinkDown calls to the service
 			i->second.interface = &CommunicationListener::DEFAULT;
Index: /source/ariba/overlay/modules/OverlayInterface.cpp
===================================================================
--- /source/ariba/overlay/modules/OverlayInterface.cpp	(revision 3699)
+++ /source/ariba/overlay/modules/OverlayInterface.cpp	(revision 3705)
@@ -75,4 +75,5 @@
 bool OverlayInterface::onLinkRequest(const NodeID& remote,
 		const DataMessage& msg) {
+	return true;
 }
 
Index: /source/ariba/overlay/modules/onehop/OneHop.cpp
===================================================================
--- /source/ariba/overlay/modules/onehop/OneHop.cpp	(revision 3699)
+++ /source/ariba/overlay/modules/onehop/OneHop.cpp	(revision 3705)
@@ -59,7 +59,11 @@
 	//
 	overlayNodes.insert( make_pair(_nodeid, LinkID::UNSPECIFIED) );
+
+	Timer::setInterval(5000);
+	Timer::start();
 }
 
 OneHop::~OneHop(){
+	Timer::stop();
 	deleteOverlay();
 }
@@ -155,5 +159,6 @@
 
 	//
-	// close all links, this will indicate the other nodes that we left
+	// send leave messages to all nodes. the nodes
+	// will then drop the links
 	//
 
@@ -162,6 +167,9 @@
 
 	for( ; i != iend; i++){
-		if( i->first != nodeid && i->second != LinkID::UNSPECIFIED )
-			baseoverlay.dropLink( i->second );
+		if( i->first != nodeid && i->second != LinkID::UNSPECIFIED ){
+
+			OneHopMessage msg (OneHopMessage::OneHopMessageTypeLeave);
+			baseoverlay.sendMessage( &msg, i->second );
+		}
 	}
 
@@ -177,5 +185,5 @@
 
 	// node went down, remove from overlay mapping
-	logging_debug( "node " << remote.toString() << " left overlay structure" );
+	logging_debug( "link " << lnk.toString() << " to node " << remote.toString() << " went down, removing node" );
 
 	OverlayNodeMapping::iterator i = overlayNodes.begin();
@@ -266,5 +274,5 @@
 		eventsReceiver->onNodeJoin( remote );
 
-	} // if( request != NULL )
+	} // OneHopMessageTypeListingRequest
 
 	//
@@ -312,11 +320,49 @@
 		} // for( ; i != iend; i++ )
 
-	} // if( reply != NULL )
+	} // OneHopMessageTypeListingReply
+
+	//
+	// handle node leaves
+	//
+
+	if( onemsg->isType(OneHopMessage::OneHopMessageTypeLeave) ){
+
+		logging_debug("received leave message from " <<
+				remote.toString() << " on link " << lnk.toString());
+
+		// drop the link to the node
+		baseoverlay.dropLink( lnk );
+
+	} // OneHopMessageTypeLeave
+
+	//
+	// handle kbr route messages
+	//
 
 	if( onemsg->isType( OneHopMessage::OneHopMessageTypeRoute) ){
 		logging_debug( "Route message arrived at destination node -> delegate to BaseOverlay" );
 		baseoverlay.incomingRouteMessage( onemsg );
-	}
-
+	} // OneHopMessageTypeRoute
+
+}
+
+void OneHop::eventFunction(){
+
+	logging_debug("<<<<<<<<<<<<<<<<onehop-table<<<<<<<<<<<<<<<<<<<");
+
+		OverlayNodeMapping::iterator i = overlayNodes.begin();
+		OverlayNodeMapping::iterator iend = overlayNodes.end();
+
+		for( ; i != iend; i++ ){
+
+			const NodeID node = i->first;
+			const LinkID link = i->second;
+			const EndpointDescriptor& endpoint = baseoverlay.getEndpointDescriptor( link );
+
+			logging_debug( 	"node: " << node.toString() <<
+							", link_: " << link.toString() << ", endp: " << endpoint.toString());
+		}
+
+	logging_debug(">>>>>>>>>>>>>>>>>onehop-table>>>>>>>>>>>>>>>>>>>>>");
 
 }
Index: /source/ariba/overlay/modules/onehop/OneHop.h
===================================================================
--- /source/ariba/overlay/modules/onehop/OneHop.h	(revision 3699)
+++ /source/ariba/overlay/modules/onehop/OneHop.h	(revision 3705)
@@ -43,11 +43,13 @@
 #include "ariba/overlay/modules/OverlayInterface.h"
 #include "ariba/utility/logging/Logging.h"
+#include "ariba/utility/system/Timer.h"
 
 using std::map;
+using ariba::utility::Timer;
 
 namespace ariba {
 namespace overlay {
 
-class OneHop: public OverlayInterface {
+class OneHop : public OverlayInterface, protected Timer {
 	use_logging_h( OneHop );
 public:
@@ -58,4 +60,8 @@
 
 protected:
+
+	/// @see Timer.h
+	virtual void eventFunction();
+
 	/// @see OverlayInterface.h
 	virtual void createOverlay();
Index: /source/ariba/overlay/modules/onehop/messages/OneHopMessage.h
===================================================================
--- /source/ariba/overlay/modules/onehop/messages/OneHopMessage.h	(revision 3699)
+++ /source/ariba/overlay/modules/onehop/messages/OneHopMessage.h	(revision 3705)
@@ -57,5 +57,6 @@
 		OneHopMessageTypeListingRequest = 1,
 		OneHopMessageTypeListingReply   = 2,
-		OneHopMessageTypeRoute	        = 3,
+		OneHopMessageTypeLeave          = 3,
+		OneHopMessageTypeRoute	        = 4,
 	} OneHopMessageType;
 
Index: /source/ariba/utility/misc/Demultiplexer.hpp
===================================================================
--- /source/ariba/utility/misc/Demultiplexer.hpp	(revision 3699)
+++ /source/ariba/utility/misc/Demultiplexer.hpp	(revision 3705)
@@ -80,5 +80,5 @@
 			LISTENER_SERVICE_MAP_CITERATOR i = mapListenerService.begin();
 			LISTENER_SERVICE_MAP_CITERATOR iend = mapListenerService.end();
-			
+
 			for( ; i != iend; i++ )
 				cout << "xxx" << i->first.toString() << " -> " << i->second << std::endl;
@@ -88,5 +88,5 @@
 			SERVICE_LISTENER_MAP_CITERATOR i = mapServiceListener.begin();
 			SERVICE_LISTENER_MAP_CITERATOR iend = mapServiceListener.end();
-			
+
 			for( ; i != iend; i++ )
 				cout << "xxx" << i->first << " -> " << i->second.toString() << std::endl;
@@ -112,5 +112,5 @@
 	void unregisterItem( S id ) {
 		T listener = get( id );
-		
+
 		{
 			boost::mutex::scoped_lock lock( mapMutex );
Index: /source/ariba/utility/types/Identifier.cpp
===================================================================
--- /source/ariba/utility/types/Identifier.cpp	(revision 3699)
+++ /source/ariba/utility/types/Identifier.cpp	(revision 3705)
@@ -319,5 +319,9 @@
 }
 bool Identifier::operator==(const Identifier& compKey) const {
-	return compareTo(compKey) == 0;
+
+	if( this->isUnspecified() && compKey.isUnspecified() )
+		return true;
+	else
+		return compareTo(compKey) == 0;
 }
 bool Identifier::operator!=(const Identifier& compKey) const {
@@ -599,5 +603,5 @@
 	//as mpn_random has no seeding function
 	// we mess aroung here a little to achive some randomness
-	// using the rand function that _is_ seeded in the 
+	// using the rand function that _is_ seeded in the
 	// StartupWrapper::initSystem function
 
