Index: /sample/pingpong/PingPong.cpp
===================================================================
--- /sample/pingpong/PingPong.cpp	(revision 3067)
+++ /sample/pingpong/PingPong.cpp	(revision 3071)
@@ -87,10 +87,10 @@
 	Timer::stop();
 
+	// leave spovnet
+	node->leave();
+
 	// unbind communication and node listener
 	node->unbind( this );                               /*NodeListener*/
 	node->unbind( this, PingPong::PINGPONG_SERVICEID ); /*CommunicationListener*/
-
-	// leave spovnet
-	node->leave();
 
 	// stop the ariba module
@@ -111,4 +111,10 @@
 	// this can be all nodes (OneHop) overlay or just some neighbors
 	// in case of a Chord or Kademlia structure
+
+	// in this sample we use auto-links: we just send out our message
+	// to the node and the link is established automatically. for more
+	// control we would use the node->establishLink function to create
+	// a link and start using the link in the CommunicationListener::onLinkUp
+	// function that is implemented further down in PingPong::onLinkUp
 
 	logging_info( "pinging overlay neighbors with ping id " << ++pingId );
@@ -139,5 +145,5 @@
 
 void PingPong::onJoinFailed( const SpoVNetID& vid ) {
-	logging_error("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX pingpong node join failed, spovnetid=" << vid.toString() );
+	logging_error("pingpong node join failed, spovnetid=" << vid.toString() );
 }
 
@@ -150,12 +156,5 @@
 }
 
-// communication listener
-bool PingPong::onLinkRequest(const NodeID& remote, const DataMessage& msg) {
-	logging_debug( "node " << remote.toString() << " wants to build up a link with us ... allowing" );
-	return true;
-}
-
 void PingPong::onMessage(const DataMessage& msg, const NodeID& remote, const LinkID& lnk) {
-
 	PingPongMessage* pingmsg = msg.getMessage()->convert<PingPongMessage> ();
 
@@ -176,6 +175,11 @@
 
 void PingPong::onLinkChanged(const LinkID& lnk, const NodeID& remote){
-	logging_info( "received link-changed event for link " << lnk.toString()
+	logging_info( "link-changed event for link " << lnk.toString()
 			<< " and node " << remote.toString() );
+}
+
+bool PingPong::onLinkRequest(const NodeID& remote, const DataMessage& msg) {
+	logging_info( "node " << remote.toString() << " wants to build up a link with us ... allowing" );
+	return true;
 }
 
@@ -185,9 +189,3 @@
 }
 
-void PingPong::onLinkQoSChanged(const LinkID& lnk, const NodeID& remote, const LinkProperties& prop){
-	logging_info( "received link-qos-changed event for link " << lnk.toString()
-				<< " and node " << remote.toString()
-				<< " with link properties " << prop.toString() );
-}
-
 }}} // namespace ariba, application, pingpong
Index: /sample/pingpong/PingPong.h
===================================================================
--- /sample/pingpong/PingPong.h	(revision 3067)
+++ /sample/pingpong/PingPong.h	(revision 3071)
@@ -35,5 +35,5 @@
 protected:
 	// communication listener interface
-	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg);
+	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg = DataMessage::UNSPECIFIED);
 	virtual void onMessage(const DataMessage& msg, const NodeID& remote, const LinkID& lnk= LinkID::UNSPECIFIED);
 	virtual void onLinkUp(const LinkID& lnk, const NodeID& remote);
@@ -41,5 +41,4 @@
 	virtual void onLinkChanged(const LinkID& lnk, const NodeID& remote);
 	virtual void onLinkFail(const LinkID& lnk, const NodeID& remote);
-	virtual void onLinkQoSChanged(const LinkID& lnk, const NodeID& remote, const LinkProperties& prop);
 
 	// node listener interface
Index: /source/ariba/CommunicationListener.cpp
===================================================================
--- /source/ariba/CommunicationListener.cpp	(revision 3067)
+++ /source/ariba/CommunicationListener.cpp	(revision 3071)
@@ -59,8 +59,4 @@
 }
 
-void CommunicationListener::onLinkQoSChanged(const LinkID& l, const NodeID& r,
-		const LinkProperties& p) {
-}
-
 bool CommunicationListener::onLinkRequest(const NodeID& remote,
 		const DataMessage& msg) {
@@ -73,4 +69,9 @@
 
 // --- extended message functionality ---
+//void CommunicationListener::onLinkQoSChanged(const LinkID& l, const NodeID& r,
+//		const LinkProperties& p) {
+//}
+
+// --- extended message functionality ---
 // void CommunicationListener::onMessageSent(seqnum_t seq_num, bool failed,
 // 		const DataMessage& msg) {
Index: /source/ariba/CommunicationListener.h
===================================================================
--- /source/ariba/CommunicationListener.h	(revision 3067)
+++ /source/ariba/CommunicationListener.h	(revision 3071)
@@ -71,8 +71,5 @@
 	virtual void onLinkFail(const LinkID& lnk, const NodeID& remote);
 
-	virtual void onLinkQoSChanged(const LinkID& lnk, const NodeID& remote,
-			const LinkProperties& prop);
-
-	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg);
+	virtual bool onLinkRequest(const NodeID& remote, const DataMessage& msg = DataMessage::UNSPECIFIED);
 
 	// --- general receive method ---
@@ -80,4 +77,8 @@
 	virtual void onMessage(const DataMessage& msg, const NodeID& remote,
 			const LinkID& lnk = LinkID::UNSPECIFIED);
+
+	// --- extended message functionality ---
+	// virtual void onLinkQoSChanged(const LinkID& lnk, const NodeID& remote,
+	//			const LinkProperties& prop);
 
 	// --- extended message functionality ---
Index: /source/ariba/Node.cpp
===================================================================
--- /source/ariba/Node.cpp	(revision 3067)
+++ /source/ariba/Node.cpp	(revision 3071)
@@ -57,5 +57,4 @@
 }
 
-//TODO: Implement error handling: no bootstrap node available
 void Node::join(const Name& vnetname) {
 	spovnetId = vnetname.toSpoVNetId();
Index: /source/ariba/Node.h
===================================================================
--- /source/ariba/Node.h	(revision 3067)
+++ /source/ariba/Node.h	(revision 3071)
@@ -58,6 +58,6 @@
 #include "DataMessage.h"
 
+using std::vector;
 using ariba::overlay::BaseOverlay;
-using std::vector;
 
 namespace ariba {
Index: /source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- /source/ariba/overlay/BaseOverlay.cpp	(revision 3067)
+++ /source/ariba/overlay/BaseOverlay.cpp	(revision 3071)
@@ -98,5 +98,6 @@
 
 	ovl.visShowNodeBubble ( ovlId, nodeId, "joining..." );
-	logging_info( "starting to join spovnet " << id.toString() << "...");
+	logging_info( "starting to join spovnet " << id.toString() <<
+			" with nodeid " << nodeId.toString());
 
 	//
@@ -145,5 +146,6 @@
 	logging_debug( "leaving overlay" );
 	// first, leave the overlay interface
-	overlayInterface->leaveOverlay();
+	if( overlayInterface != NULL )
+		overlayInterface->leaveOverlay();
 
 	// --> leave spovnet
@@ -177,5 +179,5 @@
 	//
 
-	logging_info("creating spovnet " + id.toString());
+	logging_info( "creating spovnet " + id.toString() << " with nodeid " << nodeId.toString() );
 
 	spovnetId = id;
@@ -502,6 +504,8 @@
 	if( i == linkMapping.end() ) return;
 
-	if( i->second.interface != NULL )
+	if( i->second.interface != NULL ){
 		i->second.interface->onLinkChanged( id, i->second.node );
+		// call onLinkQoSChanged?
+	}
 
 	i->second.markused();
@@ -537,8 +541,18 @@
 
 	// TODO: convert QoSParameterSet to the LinkProperties properties
-	if( i->second.interface != NULL )
-		i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
+	if( i->second.interface != NULL ){
+		// TODO: currently not in the interface: i->second.interface->onLinkQoSChanged( id, i->second.node, LinkProperties::DEFAULT );
+	}
 
 	i->second.markused();
+}
+
+bool BaseOverlay::onLinkRequest( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote ){
+
+	// also see in the receiveMessage function. there the higher layer service
+	// is asked whether to accept link requests, but there a basic link association is
+	// already built up, so we know the node id
+	logging_debug("received link request from " << remote->toString() << ", accepting");
+	return true;
 }
 
@@ -791,8 +805,20 @@
 
 		i->second.interface = iface;
-		iface->onLinkUp( link, sourcenode );
 		i->second.markused();
 
-		return true ;
+		//
+		// ask the service whether it wants to accept this link
+		//
+
+		if( iface->onLinkRequest(sourcenode) ){
+			iface->onLinkUp( link, sourcenode );
+		} else {
+			// prevent onLinkDown calls to the service
+			i->second.interface = NULL;
+			// drop the link
+			dropLink( link );
+		}
+
+		return true;
 
 	} // else if( overlayMsg->isType(OverlayMsg::OverlayMessageTypeUpdate) )
Index: /source/ariba/overlay/BaseOverlay.h
===================================================================
--- /source/ariba/overlay/BaseOverlay.h	(revision 3067)
+++ /source/ariba/overlay/BaseOverlay.h	(revision 3071)
@@ -250,24 +250,32 @@
 
 	/**
-	 * TODO
+	 * @see ariba::communication::CommunicationEvents.h
 	 */
 	virtual void onLinkUp( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
 
 	/**
-	 * TODO
+	 * @see ariba::communication::CommunicationEvents.h
 	 */
 	virtual void onLinkDown( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
 
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
 	virtual void onLinkChanged( const LinkID& id, const NetworkLocator* oldlocal, const NetworkLocator* newlocal, const NetworkLocator* oldremote, const NetworkLocator* newremote );
 
 	/**
-	 * TODO
+	 * @see ariba::communication::CommunicationEvents.h
 	 */
 	virtual void onLinkFail( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
 
 	/**
-	 * TODO
+	 * @see ariba::communication::CommunicationEvents.h
 	 */
 	virtual void onLinkQoSChanged( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote, const QoSParameterSet& qos );
+
+	/**
+	 * @see ariba::communication::CommunicationEvents.h
+	 */
+	virtual bool onLinkRequest( const LinkID& id, const NetworkLocator* local, const NetworkLocator* remote );
 
 	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: /source/ariba/utility/system/StartupWrapper.cpp
===================================================================
--- /source/ariba/utility/system/StartupWrapper.cpp	(revision 3067)
+++ /source/ariba/utility/system/StartupWrapper.cpp	(revision 3071)
@@ -103,5 +103,5 @@
 	{
 		log4cxx::LoggerPtr logger(log4cxx::Logger::getRootLogger());
-		logger->setLevel(log4cxx::Level::getInfo());
+		logger->setLevel(log4cxx::Level::getDebug());
 	}
 
