Changeset 6796 for sample/testdht


Ignore:
Timestamp:
Nov 2, 2009, 10:39:21 AM (15 years ago)
Author:
mies
Message:

DHTTest working with 2 nodes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sample/testdht/DHTTest.cpp

    r6786 r6796  
    190190
    191191void DHTTest::onKeyValue( const Data& key, const vector<Data>& value ) {
    192         logging_info( "----> Received DHT answer for '" << dtos(key) << "'.");
     192        if (value.size() == 0) {
     193                logging_info( "Received DHT answer for '" << dtos(key)
     194                                << "': no values stored! ");
     195                return;
     196        }
     197        logging_info( "Received DHT answer for '" << dtos(key) << "' "
     198                        << " with value='" << dtos(value.front()) << "'.") ;
    193199        // TODO: implement
    194200}
Note: See TracChangeset for help on using the changeset viewer.