Ignore:
Timestamp:
Jun 18, 2012, 1:40:59 PM (12 years ago)
Author:
Michael Tänzer
Message:

Fix DHT: messages got lost if not communicating over a direct link.

Also:

  • Fix mem leak
  • Code clean up
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/modules/onehop/OneHop.cpp

    r8620 r10572  
    122122}
    123123
     124/// @see OverlayInterface.h
     125const NodeID& OneHop::getNextNodeId( const NodeID& id ) const {
     126        OverlayNodeMapping::const_iterator i = overlayNodes.find( id );
     127       
     128        // FIXME: in case the NodeID is not known we should return the nearest node
     129        if (i == overlayNodes.end()) {
     130                return NodeID::UNSPECIFIED;
     131        }
     132       
     133        return i->first;
     134}
     135
    124136void OneHop::createOverlay() {
    125137        // don't need to bootstrap against ourselfs.
Note: See TracChangeset for help on using the changeset viewer.