Changeset 6873 for source/ariba


Ignore:
Timestamp:
Nov 6, 2009, 11:50:18 AM (14 years ago)
Author:
mies
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/overlay/BaseOverlay.cpp

    r6872 r6873  
    6969public:
    7070        ValueEntry( const Data& value ) : ttl(0), last_update(time(NULL)),
    71         last_change(time(NULL)), value(value.clone()) {
     71                last_change(time(NULL)), value(value.clone()) {
    7272        }
    7373
     
    11381138        // resolve end-point descriptor from the base-overlay routing table
    11391139        const EndpointDescriptor& ep = overlayInterface->resolveNode( node );
    1140         if(ep != EndpointDescriptor::UNSPECIFIED()) return ep;
     1140        if(ep.toString() != "") return ep;
    11411141
    11421142        // see if we can find the node in our own table
     
    11441144                if(ld->remoteNode != node) continue;
    11451145                const EndpointDescriptor& ep = bc->getEndpointDescriptor(ld->communicationId);
    1146                 if(ep.toString().size()==0) continue;
     1146                if(ep.toString() == "") continue;
    11471147                if(ep != EndpointDescriptor::UNSPECIFIED()) return ep;
    11481148        }
     
    20882088        }
    20892089
    2090         // re-publish values
     2090        // erase old values from local DHT
    20912091        BOOST_FOREACH( DHTEntry& entry, localDHT->entries ) {
    20922092                // erase old entries
    20932093                entry.erase_expired_entries();
    2094 
    2095                 // re-publish values
     2094        }
     2095
     2096        // re-publish values
     2097        BOOST_FOREACH( DHTEntry& entry, localDHT->entries ) {
    20962098                BOOST_FOREACH( ValueEntry& value, entry.values )
    20972099                        dhtPut(entry.key, value.get_value(), 0, true );
     
    21842186        // calculate hash
    21852187        NodeID dest = NodeID::sha1(key.getBuffer(), key.getLength() / 8);
    2186         DHTMessage dhtmsg(key,value);
    2187         dhtmsg.setReplace(replace);
     2188        DHTMessage dhtmsg( key, value );
     2189        dhtmsg.setReplace( replace );
    21882190        dhtmsg.setTTL(ttl);
    21892191
    2190         OverlayMsg msg(OverlayMsg::typeDHTPut);
     2192        OverlayMsg msg( OverlayMsg::typeDHTPut );
    21912193        msg.encapsulate( &dhtmsg );
    21922194        dhtSend(&msg, dest);
Note: See TracChangeset for help on using the changeset viewer.