Changeset 5860 for source/ariba/overlay/OverlayBootstrap.cpp
- Timestamp:
- Aug 11, 2009, 1:47:47 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
source/ariba/overlay/OverlayBootstrap.cpp
r5838 r5860 88 88 89 89 void OverlayBootstrap::handleSystemEvent(const SystemEvent& event){ 90 EventData* data = event.getData<EventData>();90 JoinData* data = event.getData<JoinData>(); 91 91 92 92 // announcement for our spovnet … … 129 129 // 130 130 131 EventData* data = new EventData();131 JoinData* data = new JoinData(); 132 132 data->spovnetid = sid; 133 133 data->nodeid = nid; … … 154 154 boost::mutex::scoped_lock lock(lastJoinesMutex); 155 155 156 EventData data;156 JoinData data; 157 157 data.spovnetid = spovnetid; 158 158 data.nodeid = nodeid; 159 159 data.endpoint = _ep; 160 160 161 lastJoines.push_front(JoinData(data)); 161 logging_info("recording bootstrap information " << data.endpoint.toString()); 162 163 lastJoines.push_front(data); 162 164 } 163 165 … … 175 177 // we have overlay neighbors -> ok 176 178 if(overlay->getOverlayNeighbors().size() > 0) return; 179 180 logging_info("overlay not joined, checking for earlier used bootstrap information"); 181 EndpointDescriptor joinep = EndpointDescriptor::UNSPECIFIED(); 177 182 178 183 // no overlay neighbors -> try out already … … 185 190 186 191 // use last used element and then put it into back 187 JoinData data = *i; 188 lastJoines.pop_front(); 189 lastJoines.push_back(data); 192 joinep = (*i).endpoint; 193 194 if(lastJoines.size() >= 2) 195 swap( *lastJoines.begin(), *(--(lastJoines.end())) ); 190 196 } 191 197 192 logging_info("no overlay connections detected, " << 193 "trying to join using old bootstrap information"); 198 logging_info("no overlay conenctivity detected, " << 199 "trying to join using old bootstrap information: " << 200 joinep.toString()); 194 201 195 202 // try to join using this node, if the join is successfull 196 203 // the endpoint will again be inserted using recordJoin 197 overlay->joinSpoVNet( spovnetid, data.data.endpoint);204 overlay->joinSpoVNet( spovnetid, joinep ); 198 205 } 199 206 … … 202 209 203 210 void OverlayBootstrap::WatchdogTimer::startWatchdog(){ 204 Timer::setInterval( 2000);211 Timer::setInterval(5000); 205 212 Timer::start(); 206 213 }
Note:
See TracChangeset
for help on using the changeset viewer.