Index: source/ariba/SideportListener.cpp
===================================================================
--- source/ariba/SideportListener.cpp	(revision 5871)
+++ source/ariba/SideportListener.cpp	(revision 5872)
@@ -85,5 +85,5 @@
 bool SideportListener::isRelayedNode(const NodeID& node){
 	if( overlay == NULL ) return false;
-/*
+
 	bool relay = false;
 
@@ -91,27 +91,24 @@
 
 		// is we find a direct connection this is not a relayed node
-		if(link->relay == false && link->remoteNode == node && link->up)
+		if(link->relayed == false && link->remoteNode == node && link->up)
 			return false;
 
-		// if we find a relay conenction this can be a relayed node
+		// if we find a relay connection this can be a relayed node
 		// but only if we find no direct connection as above
-		if( link->relay && link->remoteNode == node && link->up)
+		if( link->relayed && link->remoteNode == node && link->up)
 			relay = true;
 	}
 
 	return relay;
-	*/
-
-	return false;
 }
 
 bool SideportListener::isRelayingNode(const NodeID& node){
 	if( overlay == NULL ) return false;
-/*
+
 	BOOST_FOREACH( LinkDescriptor* link, overlay->links ){
-		if( link->relay && link->localRelay == node && link->up)
+		if( link->relaying && link->remoteNode == node && link->up)
 			return true;
 	}
-*/
+
 	return false;
 }
@@ -122,7 +119,14 @@
 
 	using namespace ariba::addressing;
-/*
-	LinkDescriptor* link = overlay->getSendDescriptor(node);
-	if (link==NULL) return (Protocol)ret;
+
+	LinkDescriptor* link = NULL;
+	BOOST_FOREACH( LinkDescriptor* lnk, overlay->links ){
+		if(lnk->up && lnk->remoteNode == node && !lnk->relayed && lnk->communicationUp){
+			link = lnk;
+			break;
+		}
+	}
+
+	if (link == NULL) return (Protocol)ret;
 
 	BaseCommunication::LinkDescriptor& bclink =
@@ -145,5 +149,5 @@
 		ret = SideportListener::rfcomm;
 	}
-*/
+
 	return (Protocol)ret;
 }
