Index: source/ariba/overlay/BaseOverlay.cpp
===================================================================
--- source/ariba/overlay/BaseOverlay.cpp	(revision 4838)
+++ source/ariba/overlay/BaseOverlay.cpp	(revision 4839)
@@ -106,88 +106,4 @@
 }
 
-void BaseOverlay::joinSpoVNet(const SpoVNetID& id, const EndpointDescriptor& bootstrapEp){
-
-	ovl.visShowNodeBubble ( ovlId, nodeId, "joining..." );
-	logging_info( "starting to join spovnet " << id.toString() <<
-			" with nodeid " << nodeId.toString());
-
-	spovnetId = id;
-	state = BaseOverlayStateJoinInitiated;
-
-	//
-	// start bootstrapping for spovnetid
-	//
-
-	overlayBootstrap.start( this, spovnetId, nodeId );
-	overlayBootstrap.publish( bc->getEndpointDescriptor() );
-
-	//
-	// contact the spovnet initiator and request
-	// to join. if the join is granted we will
-	// receive further information on the structure
-	// of the overlay that is used in the spovnet
-	//
-	// but first, we have to establish a link to the initiator...
-	//
-
-	initiatorLink = bc->establishLink( bootstrapEp );
-	logging_info("join process initiated for " << id.toString() << "...");
-}
-
-void BaseOverlay::leaveSpoVNet(){
-
-	logging_info( "leaving spovnet " << spovnetId );
-	bool ret = ( state != this->BaseOverlayStateInvalid );
-
-	logging_debug( "dropping all auto-links ..." );
-
-	// now we start leaving the spovnet: fist delete all links
-	// that we still have in the baseoverlay initiated by
-	// some services, the leave the actual overlay structure,
-	// then leave the spovnet
-
-	// --> drop all service links
-
-	vector<LinkID> servicelinks;
-	BOOST_FOREACH( LinkPair item, linkMapping ){
-		if( item.second.service != OverlayInterface::OVERLAY_SERVICE_ID )
-			servicelinks.push_back( item.first );
-	}
-	BOOST_FOREACH( LinkID lnk, servicelinks ){
-		// the dropLink function will remove
-		// the item from the linkMapping
-		dropLink( lnk );
-	}
-
-	// --> leave overlay structure
-
-	logging_debug( "leaving overlay" );
-	// first, leave the overlay interface
-	if( overlayInterface != NULL )
-		overlayInterface->leaveOverlay();
-
-	// --> leave spovnet
-
-	if( state != BaseOverlayStateInitiator ){
-
-		// then, leave the spovnet baseoverlay
-		OverlayMsg overMsg( OverlayMsg::OverlayMessageTypeBye, nodeId );
-		bc->sendMessage( initiatorLink, &overMsg );
-
-		// drop the link and set to correct state
-		bc->dropLink( initiatorLink );
-		initiatorLink = LinkID::UNSPECIFIED;
-	}
-
-	state = BaseOverlayStateInvalid;
-	ovl.visShutdown( ovlId, nodeId, string("") );
-
-	// inform all registered services of the event
-	BOOST_FOREACH( NodeListener* i, nodeListeners ){
-		if( ret ) i->onLeaveCompleted( spovnetId );
-		else      i->onLeaveFailed( spovnetId );
-	}
-}
-
 void BaseOverlay::createSpoVNet(const SpoVNetID& id, const OverlayParameterSet& param, const SecurityParameterSet& sec, const QoSParameterSet& qos){
 
@@ -216,4 +132,87 @@
 }
 
+void BaseOverlay::joinSpoVNet(const SpoVNetID& id, const EndpointDescriptor& bootstrapEp){
+
+	ovl.visShowNodeBubble ( ovlId, nodeId, "joining..." );
+	logging_info( "starting to join spovnet " << id.toString() <<
+			" with nodeid " << nodeId.toString());
+
+	spovnetId = id;
+	state = BaseOverlayStateJoinInitiated;
+
+	//
+	// start bootstrapping for spovnets and publish our information
+	//
+
+	overlayBootstrap.start( this, spovnetId, nodeId );
+	overlayBootstrap.publish( bc->getEndpointDescriptor() );
+
+	//
+	// contact the spovnet initiator and request
+	// to join. if the join is granted we will
+	// receive further information on the structure
+	// of the overlay that is used in the spovnet
+	//
+	// but first, we have to establish a link to the initiator...
+	//
+
+	initiatorLink = bc->establishLink( bootstrapEp );
+	logging_info("join process initiated for " << id.toString() << "...");
+}
+
+void BaseOverlay::leaveSpoVNet(){
+
+	logging_info( "leaving spovnet " << spovnetId );
+	bool ret = ( state != this->BaseOverlayStateInvalid );
+
+	logging_debug( "dropping all auto-links ..." );
+
+	// now we start leaving the spovnet: fist delete all links
+	// that we still have in the baseoverlay initiated by
+	// some services, the leave the actual overlay structure,
+	// then leave the spovnet
+
+	// --> drop all service links
+
+	vector<LinkID> servicelinks;
+	BOOST_FOREACH( LinkPair item, linkMapping ){
+		if( item.second.service != OverlayInterface::OVERLAY_SERVICE_ID )
+			servicelinks.push_back( item.first );
+	}
+	BOOST_FOREACH( LinkID lnk, servicelinks ){
+		// the dropLink function will remove
+		// the item from the linkMapping
+		dropLink( lnk );
+	}
+
+	// --> leave overlay structure
+
+	logging_debug( "leaving overlay" );
+	// first, leave the overlay interface
+	if( overlayInterface != NULL )
+		overlayInterface->leaveOverlay();
+
+	// --> leave spovnet
+
+	if( state != BaseOverlayStateInitiator ){
+
+		// then, leave the spovnet baseoverlay
+		OverlayMsg overMsg( OverlayMsg::OverlayMessageTypeBye, nodeId );
+		bc->sendMessage( initiatorLink, &overMsg );
+
+		// drop the link and set to correct state
+		bc->dropLink( initiatorLink );
+		initiatorLink = LinkID::UNSPECIFIED;
+	}
+
+	state = BaseOverlayStateInvalid;
+	ovl.visShutdown( ovlId, nodeId, string("") );
+
+	// inform all registered services of the event
+	BOOST_FOREACH( NodeListener* i, nodeListeners ){
+		if( ret ) i->onLeaveCompleted( spovnetId );
+		else      i->onLeaveFailed( spovnetId );
+	}
+}
 
 /// establishes a link between two arbitrary nodes
