Changeset 5776
- Timestamp:
- Aug 7, 2009, 12:55:13 PM (15 years ago)
- Location:
- source/ariba/overlay
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/BaseOverlay.cpp
r5760 r5776 1394 1394 RelayMessage* relayMsg = overlayMsg->decapsulate<RelayMessage>(); 1395 1395 1396 // mark incoming link as relay 1397 if (ld!=NULL) ld->markAsRelay(); 1398 1399 // am I the destination of this message? yes-> 1400 if (relayMsg->getDestNode() == nodeId ) { 1401 // deliver relay message locally! 1402 logging_debug("Relay message reached destination. Handling the message."); 1403 handleMessage( relayMsg, relayMsg->getDestLink(), LinkID::UNSPECIFIED, remoteNode ); 1404 ret = true; 1405 break; 1406 } 1407 1396 1408 // is relay message informative? 1397 1409 switch (relayMsg->getType()) { … … 1402 1414 << " relay " << relayMsg->getRelayNode() 1403 1415 << " destination " << relayMsg->getDestNode() ); 1404 1405 // mark incoming link as relay1406 if (ld!=NULL) ld->markAsRelay();1407 1408 // am I the destination of this message? yes->1409 if (relayMsg->getDestNode() == nodeId ) {1410 // deliver relay message locally!1411 logging_debug("Relay message reached destination. Handling the message.");1412 handleMessage( relayMsg, relayMsg->getDestLink(), LinkID::UNSPECIFIED, remoteNode );1413 ret = true;1414 break;1415 }1416 1416 1417 1417 // create route message … … 1426 1426 } else { 1427 1427 logging_info("Routing relay message to " << relayMsg->getRelayNode().toString() ); 1428 sendOverlay( &_overMsg, relayMsg->getRelayNode() ); 1428 // sendOverlay( &_overMsg, relayMsg->getRelayNode() ); 1429 sendOverlay( &_overMsg, relayMsg->getDestNode() ); 1429 1430 } 1430 1431 ret = true; … … 1437 1438 << " relay " << relayMsg->getRelayNode() 1438 1439 << " destination " << relayMsg->getDestNode() ); 1439 1440 // mark incoming link as relay1441 if (ld!=NULL) ld->markAsRelay();1442 1443 // am I the destination of this message? yes->1444 if (relayMsg->getDestNode() == nodeId ) {1445 // deliver relay message locally!1446 logging_debug("Relay message reached destination. Handling the message.");1447 handleMessage( relayMsg, relayMsg->getDestLink(), LinkID::UNSPECIFIED, remoteNode );1448 ret = true;1449 break;1450 }1451 1440 1452 1441 // am I the relay for this message? yes-> -
source/ariba/overlay/modules/chord/Chord.cpp
r5761 r5776 92 92 93 93 // establish link via base overlay 94 return baseoverlay.establishLink(endp, node, OverlayInterface::OVERLAY_SERVICE_ID, remoteRelay ); 94 return baseoverlay.establishLink(endp, node, OverlayInterface::OVERLAY_SERVICE_ID, 95 NodeID::UNSPECIFIED ); 95 96 } 96 97 … … 377 378 logging_debug("Discovery split: routing discovery message to successor " 378 379 << succ_item->id.toString() ); 380 cmsg_s.setDestination(succ_item->id); 379 381 send(&cmsg_s, succ_item->info); 380 382 } … … 390 392 logging_debug("Discovery split: routing discovery message to predecessor " 391 393 << pred_item->id.toString() ); 394 cmsg_p.setDestination(pred_item->id); 392 395 send(&cmsg_p, pred_item->info); 393 396 } … … 484 487 orphan_removal_counter++; 485 488 if (orphan_removal_counter <0 || orphan_removal_counter >= 4) { 486 back_routes.clear(); 489 for (vector<back_route>::iterator i = back_routes.begin(); 490 i!=back_routes.end(); i++) { 491 back_route& br = *i; 492 if (difftime(br.lastseen,time(NULL))>5) i = 493 back_routes.erase(i); 494 } 487 495 logging_info("Running orphan removal"); 488 496 orphan_removal_counter = 0; -
source/ariba/overlay/modules/chord/messages/ChordMessage.h
r4625 r5776 88 88 } 89 89 90 void setSource(const NodeID& source ) { 91 this->source = source; 92 } 93 90 94 const NodeID& getSource() const { 91 95 return source; 96 } 97 98 void setDestination(const NodeID& destination ) { 99 this->destination = destination; 92 100 } 93 101
Note:
See TracChangeset
for help on using the changeset viewer.