Changeset 5406 for source/ariba/overlay
- Timestamp:
- Jul 29, 2009, 10:25:32 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/BaseOverlay.cpp
r5316 r5406 146 146 } 147 147 148 /// forwards a message over relays/ overlay/directly using link descriptor148 /// forwards a message over relays/directly using link descriptor 149 149 seqnum_t BaseOverlay::sendMessage( Message* message, const LinkDescriptor* ld ) { 150 150 151 151 // directly send message 152 152 if ( !ld->communicationId.isUnspecified() && ld->communicationUp ) { 153 logging_debug(" sendMessage: Sending message via Base Communication");153 logging_debug("Send: Sending message via Base Communication"); 154 154 return bc->sendMessage( ld->communicationId, message ); 155 155 } … … 157 157 // relay message 158 158 else if ( ld->relay ) { 159 logging_debug("sendMessage: Relaying message to node " 159 160 logging_debug("Send: Relaying message to node " 160 161 << ld->remoteNode.toString() 161 162 << " using relay " << ld->localRelay … … 165 166 LinkDescriptor* rld = getRelayDescriptor(ld->localRelay); 166 167 if (rld==NULL) { 167 logging_error(" sendMessage: Relay descriptor for relay " <<168 ld->localRelay.toString() << " unknown.");168 logging_error("Send: Relay descriptor for relay " << 169 ld->localRelay.toString() << " is unknown."); 169 170 return -1; 170 171 } … … 183 184 } 184 185 185 // route message using overlay186 // error 186 187 else { 187 logging_error("Could not send message descriptor=" << ld ); 188 logging_debug( "sendMessage: Routing message to node " << ld->remoteNode.toString() ); 189 overlayInterface->routeMessage( ld->remoteNode, message ); 190 return 0; 191 } 192 188 logging_error( "Could not send message descriptor=" << ld ); 189 return -1; 190 } 193 191 return -1; 194 192 } … … 1399 1397 LinkDescriptor* rld = getDescriptor( overlayMsg->getRelayLink() ); 1400 1398 logging_force( "Received direct link convert notification for " << rld ); 1399 1400 // set communcation link id and set it up 1401 1401 rld->communicationId = ld->communicationId; 1402 1403 // this is neccessary since this link was a relay link before! 1402 1404 rld->communicationUp = true; 1405 1406 // this is not a relay link anymore! 1403 1407 rld->relay = false; 1404 rld->localRelay = NodeID::UNSPECIFIED;1408 rld->localRelay = NodeID::UNSPECIFIED; 1405 1409 rld->remoteRelay = NodeID::UNSPECIFIED; 1410 1411 // mark used and alive! 1412 rld->markAsUsed(); 1413 rld->markAlive(); 1414 1415 // erase the original descriptor 1406 1416 eraseDescriptor(ld->overlayId); 1407 1417 break;
Note:
See TracChangeset
for help on using the changeset viewer.