Ignore:
Timestamp:
Jun 18, 2012, 1:40:59 PM (13 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
Location:
source/ariba/overlay/modules/chord
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/modules/chord/Chord.cpp

    r7744 r10572  
    201201}
    202202
     203/// @see OverlayInterface.h
     204const NodeID& Chord::getNextNodeId( const NodeID& id ) const {
     205        // get next hop
     206        const route_item* item = table->get_next_hop(id);
     207       
     208        // return unspecified if no next hop could be found
     209        if (item == NULL) {
     210                return NodeID::UNSPECIFIED;
     211        }
     212       
     213        return item->id;
     214}
     215
    203216OverlayInterface::NodeList Chord::getKnownNodes(bool deep) const {
    204217        OverlayInterface::NodeList nodelist;
  • source/ariba/overlay/modules/chord/Chord.h

    r6854 r10572  
    104104        /// @see OverlayInterface.h
    105105        virtual const LinkID& getNextLinkId( const NodeID& id ) const;
     106       
     107        /// @see OverlayInterface.h
     108        virtual const NodeID& getNextNodeId( const NodeID& id ) const;
    106109
    107110        /// @see OverlayInterface.h
Note: See TracChangeset for help on using the changeset viewer.