Changeset 5628 for source


Ignore:
Timestamp:
Aug 3, 2009, 4:43:36 PM (15 years ago)
Author:
mies
Message:
 
Location:
source/ariba
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • source/ariba/communication/BaseCommunication.cpp

    r5624 r5628  
    5858/// adds an endpoint to the list
    5959void BaseCommunication::add_endpoint( const address_v* endpoint ) {
     60        if (endpoint==NULL) return;
    6061        BOOST_FOREACH( endpoint_reference& ref, remote_endpoints ) {
    6162                if (*ref.endpoint == *endpoint) {
     
    7273/// removes an endpoint from the list
    7374void BaseCommunication::remove_endpoint( const address_v* endpoint ) {
     75        if (endpoint==NULL) return;
    7476        for (vector<endpoint_reference>::iterator i = remote_endpoints.begin();
    7577                i != remote_endpoints.end(); i++) {
  • source/ariba/overlay/modules/chord/Chord.cpp

    r5624 r5628  
    376376                }
    377377                }
     378                delete dmsg;
    378379                break;
    379380        }
     
    393394
    394395void Chord::eventFunction() {
     396        pending.clear();
    395397        stabilize_counter++;
    396         if (stabilize_counter == 3) {
    397                 pending.clear();
     398        if (stabilize_counter == 2) {
    398399                size_t numNeighbors = 0;
    399400                for (size_t i = 0; i < table->size(); i++) {
  • source/ariba/overlay/modules/chord/detail/chord_routing_table.hpp

    r5432 r5628  
    253253                for (size_t i=0; i<table.size(); i++) {
    254254                        item* curr = &table[i];
     255
    255256                        // not not include orphans into routing!
    256257                        if (curr->ref_count==0) continue;
  • source/ariba/overlay/modules/chord/messages/Discovery.h

    r4625 r5628  
    7474        explicit Discovery();
    7575        virtual ~Discovery();
    76 /*
    77         typedef pair<NodeID,EndpointDescriptor*> NodeEndpoint;
    78         typedef vector<NodeEndpoint> NodeEndpointList;
    79 
    80         void add(const NodeID& node, EndpointDescriptor* endp);
    81 
    82         const NodeEndpointList& getList();
    83 */
    8476
    8577        EndpointDescriptor* getSourceEndpoint() const {
     
    111103        uint8_t ttl;
    112104        EndpointDescriptor* source_endpoint;
    113 //      NodeEndpointList descriptors;
    114105};
    115106
     
    117108
    118109sznBeginDefault( ariba::overlay::Discovery, X ) {
    119 
    120110        /// serialize follow-type and time-to-live
    121111        X && follow_type && ttl;
     
    123113        // serialize end-point
    124114        X && VO(source_endpoint);
    125 /*
    126         // serialize length of descriptor list
    127         uint16_t len = descriptors.size();
    128         X && len;
    129         if (X.isDeserializer()) descriptors.resize(len);
    130 
    131         // serialize descriptors
    132         for (int i=0; i<len; i++)
    133                 X && &descriptors[i].first && VO(descriptors[i].second);
    134 
    135         // serialize payload
    136         X && Payload();
    137 */
    138115} sznEnd();
    139116
Note: See TracChangeset for help on using the changeset viewer.