Changeset 6874 for source/ariba/overlay


Ignore:
Timestamp:
Nov 6, 2009, 12:57:36 PM (15 years ago)
Author:
mies
Message:
 
Location:
source/ariba/overlay
Files:
2 edited

Legend:

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

    r6873 r6874  
    20972097        BOOST_FOREACH( DHTEntry& entry, localDHT->entries ) {
    20982098                BOOST_FOREACH( ValueEntry& value, entry.values )
    2099                         dhtPut(entry.key, value.get_value(), 0, true );
     2099                        dhtPut(entry.key, value.get_value(), 0, true, true );
    21002100        }
    21012101}
     
    21712171
    21722172/// put a value to the DHT with a ttl given in seconds
    2173 void BaseOverlay::dhtPut( const Data& key, const Data& value, int ttl, bool replace ) {
     2173void BaseOverlay::dhtPut( const Data& key, const Data& value, int ttl, bool replace, bool no_local_refresh ) {
    21742174
    21752175        logging_info("DHT: putting key=" <<  key
     
    21802180
    21812181
    2182         // put into local data store (for refreshes)
    2183         if (replace) localDHT->remove(key);
    2184         localDHT->put(key, value, ttl);
     2182        if (!no_local_refresh) {
     2183                // put into local data store (for refreshes)
     2184                if (replace) localDHT->remove(key);
     2185                localDHT->put(key, value, ttl);
     2186        }
    21852187
    21862188        // calculate hash
  • source/ariba/overlay/BaseOverlay.h

    r6854 r6874  
    279279
    280280        /// put a value to the DHT with a ttl given in seconds
    281         void dhtPut( const Data& key, const Data& value, int ttl = 0, bool replace = false);
     281        void dhtPut( const Data& key, const Data& value, int ttl = 0, bool replace = false, bool no_local_refresh = false);
    282282
    283283        /// removes a key value pair from the DHT
Note: See TracChangeset for help on using the changeset viewer.