Changeset 7744 for source/ariba/overlay
- Timestamp:
- Mar 11, 2010, 9:28:24 AM (15 years ago)
- Location:
- source/ariba/overlay
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/BaseOverlay.cpp
r7532 r7744 135 135 for (vector<ValueEntry>::iterator i = values.begin(); 136 136 i != values.end(); i++ ) 137 if (i->is_ttl_elapsed()) i = values.erase(i) ;137 if (i->is_ttl_elapsed()) i = values.erase(i)-1; 138 138 } 139 139 }; … … 214 214 // found? yes-> delete entry 215 215 if ( equals(entry.key, key) ) { 216 i = entries.erase(i) ;216 i = entries.erase(i)-1; 217 217 return true; 218 218 } … … 233 233 // value found? yes-> delete 234 234 if (equals(j->get_value(), value)) { 235 j = entry.values.erase(j) ;235 j = entry.values.erase(j)-1; 236 236 return true; 237 237 } … … 252 252 // value found? yes-> delete 253 253 if (j->is_ttl_elapsed()) 254 j = entry.values.erase(j) ;254 j = entry.values.erase(j)-1; 255 255 } 256 256 257 if (entry.values.size()==0) i = entries.erase(i) ;257 if (entry.values.size()==0) i = entries.erase(i)-1; 258 258 } 259 259 } … … 1911 1911 "in the overlay from service " + service.toString() ); 1912 1912 1913 if(message == NULL) return; 1914 message->setReleasePayload(false); 1915 1913 1916 OverlayInterface::NodeList nodes = overlayInterface->getKnownNodes(true); 1914 OverlayInterface::NodeList::iterator i = nodes.begin(); 1915 for(; i != nodes.end(); i++ ) { 1916 if( *i == nodeId) continue; // don't send to ourselfs 1917 sendMessage( message, *i, service ); 1917 for(size_t i=0; i<nodes.size(); i++){ 1918 NodeID& id = nodes.at(i); 1919 if(id == this->nodeId) continue; // don't send to ourselfs 1920 if(i+1 == nodes.size()) message->setReleasePayload(true); // release payload on last send 1921 sendMessage( message, id, service ); 1918 1922 } 1919 1923 } -
source/ariba/overlay/modules/chord/Chord.cpp
r6919 r7744 250 250 logging_info("new routing neighbor: " << remote.toString() 251 251 << " with link " << lnk.toString()); 252 // replace with new link 253 if (item->info!=lnk && item->info.isUnspecified()==false) 254 baseoverlay.dropLink(item->info); 255 item->info = lnk; 252 253 // replace with new link if link is "better" 254 if (item->info!=lnk && item->info.isUnspecified()==false) { 255 if (baseoverlay.compare( item->info, lnk ) == 1) { 256 logging_info("Replacing link due to concurrent link establishment."); 257 baseoverlay.dropLink(item->info); 258 item->info = lnk; 259 } 260 } else { 261 item->info = lnk; 262 } 256 263 257 264 // discover neighbors of new overlay neighbor
Note:
See TracChangeset
for help on using the changeset viewer.