Changeset 5872
- Timestamp:
- Aug 11, 2009, 4:22:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/SideportListener.cpp
r5871 r5872 85 85 bool SideportListener::isRelayedNode(const NodeID& node){ 86 86 if( overlay == NULL ) return false; 87 /* 87 88 88 bool relay = false; 89 89 … … 91 91 92 92 // is we find a direct connection this is not a relayed node 93 if(link->relay == false && link->remoteNode == node && link->up)93 if(link->relayed == false && link->remoteNode == node && link->up) 94 94 return false; 95 95 96 // if we find a relay con enction this can be a relayed node96 // if we find a relay connection this can be a relayed node 97 97 // but only if we find no direct connection as above 98 if( link->relay && link->remoteNode == node && link->up)98 if( link->relayed && link->remoteNode == node && link->up) 99 99 relay = true; 100 100 } 101 101 102 102 return relay; 103 */104 105 return false;106 103 } 107 104 108 105 bool SideportListener::isRelayingNode(const NodeID& node){ 109 106 if( overlay == NULL ) return false; 110 /* 107 111 108 BOOST_FOREACH( LinkDescriptor* link, overlay->links ){ 112 if( link->relay && link->localRelay== node && link->up)109 if( link->relaying && link->remoteNode == node && link->up) 113 110 return true; 114 111 } 115 */ 112 116 113 return false; 117 114 } … … 122 119 123 120 using namespace ariba::addressing; 124 /* 125 LinkDescriptor* link = overlay->getSendDescriptor(node); 126 if (link==NULL) return (Protocol)ret; 121 122 LinkDescriptor* link = NULL; 123 BOOST_FOREACH( LinkDescriptor* lnk, overlay->links ){ 124 if(lnk->up && lnk->remoteNode == node && !lnk->relayed && lnk->communicationUp){ 125 link = lnk; 126 break; 127 } 128 } 129 130 if (link == NULL) return (Protocol)ret; 127 131 128 132 BaseCommunication::LinkDescriptor& bclink = … … 145 149 ret = SideportListener::rfcomm; 146 150 } 147 */ 151 148 152 return (Protocol)ret; 149 153 }
Note:
See TracChangeset
for help on using the changeset viewer.